Problem/Motivation

I received empty body mail when a user create a account or reset his password.

Steps to reproduce

1. Configure HTML default message format, I use sendmail by default
2. Use native user email
3. User create his account

=> Empty body mail

Other information

My conf

In this capture you can see "Plain text" (Texte Brut) in text format input, but in config the value is "". It's a default value in form.

Proposed resolution

I resolve it changing the default value of text_format in config "symfony_mailer_lite.message".
text_format: "" => text_format: plain_text

The function check_markup use to transform body message with no text_format return empty string.

Comments

Ilyna created an issue. See original summary.

ilyna’s picture

Assigned: ilyna » Unassigned
zengenuity’s picture

Status: Active » Postponed (maintainer needs more info)

I tested a fresh install of this module with the settings you show configured. When I created a new user account, I received the email notifications fine. The body had the standard text in it, converted to HTML.

            <p>testcreate,</p>
<p>Thank you for registering at Drupal 10. Your application for an account is currently pending approval. Once it has been approved, you will receive another email containing information about how to log in, set your password, and other details.</p>
<p>--  Drupal 10 team</p>

Perhaps you should check your Plain Text text format to make sure there's nothing in there that could be interfering with the conversion of the text.

alex g’s picture

I've just hit the issue myself.

The value of the field was indeed ''.

I set the config with drush -y config-set symfony_mailer_lite.message text_format plain_text and now it works as expected.

We had migrated from Swift mailer straight onto 1.0.6.

However I couldn't replicate with a fresh install of the module on another site.

thekurt’s picture

Status: Postponed (maintainer needs more info) » Active

I have a fresh install of Drupal CMS:
- Drupal version 11.2.5
- Drupal Symfony Mailer Lite 2.0.3
I made no changes to any setting.

When testing on admin/config/system/symfony-mailer-lite/test, I got an error.

I tried something else: creating a new user. So that a mail would be sent. Didn't work.

The error:
An attempt to send an e-mail message failed, and the following error message was returned : Process failed with exit code 1:
The e-mail carried the following headers:
Subject: An administrator created an account for you at My Drupal CMS
Mime-Version: 1.0
X-Mailer: Drupal
Return-Path:
Sender: admin@ahamedia.be
To: kurt@mediaha.be
From: My Drupal CMS
Reply-To: admin@ahamedia.be

I've looked on many places, but couldn't find a solution. The only thing that could be related is that there is an empty body field in the testmail provided?
I hope to get a solution here.

A second log-message said that there was an error sending the mail because there was no reply-to adress.

Regards,
Kurt

zengenuity’s picture

Status: Active » Closed (cannot reproduce)

@thekurt, your error is not the same as the issue here. You have a more general error with sending email from your environment. You should check the transport settings and make sure they are set up correctly for your environment.

You may find more detailed error messages about the nature of the transport problem in the error log.

Now that this issue is closed, please review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, please credit people who helped resolve this issue.