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

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
Comment #2
ilyna commentedComment #3
zengenuity commentedI 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.
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.
Comment #4
alex g commentedI'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.
Comment #5
thekurt commentedI 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
Comment #6
zengenuity commented@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.