Mails Incorrectly Being Sent as Plain Text

Created on 17 June 2024, 5 months ago
Updated 18 June 2024, 5 months ago

Hello, I've installed and enabled this module on a Drupal 10 site that is using the default Drupal site-wide contact form.

I'm trying to solve this problem: https://drupal.stackexchange.com/questions/268379/why-wrap-lines-in-plai...
That is, the Drupal site-wide contact form is sending e-mails as plain text, and Drupal is following an old standard that breaks lines of text after 78 characters.

So at admin/config/system/mailsystem, under 'Default Mail System', I've selected "Default PHP Mailer" for both the Formatter and Sender. For 'Theme to render the emails', I've selected 'Claro' (which is the administration theme). Note: I also tried selecting "Default" here.

Unfortunately, I'm still getting text line breaks in both the auto-reply and notification e-mails (see attached screenshot). I believe this means the e-mails are being sent as plain text, and not HTML format (which I assume your module should convert these e-mails to).

I also tried, under 'Module-specific configuration', adding "Default PHP Mailer" to the Contact module. However, this didn't make any difference.

I'm just trying to get the standard Drupal contact e-mails to display without odd-looking line breaks in the e-mail text. I'll be happy to provide any further info. to help diagnose this and find a solution.

πŸ’¬ Support request
Status

Closed: duplicate

Version

4.4

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States jimmb

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @jimmb
  • Status changed to Closed: duplicate 5 months ago
  • πŸ‡ΊπŸ‡ΈUnited States tr Cascadia

    Drupal does not support HTML email by default, and has never supported HTML email by default - to send HTML email you need to use a contributed module that will do that for you.

    The MailSystem module allows you to choose which contributed module(s) will be used for the email formatting task and for the email sending task, but MailSystem does NOT format by itself and does NOT send mail by itself.

    Specifically, the "Default PHP Mailer" performs NO formatting and sends mail using PHP as configured on your server. This will not allow you to send HTML email.

    Apparently you are using symfony_mailer_lite, since you opened an identical issue here: πŸ’¬ Module Isn't Working or Emails Sent as Plain Text Active
    Any problems you have using that module to send HTML email should be addressed in the issue queue for that module.

    Drupal is following an old standard that breaks lines of text after 78 characters.

    This is not an OLD standard, it is THE standard. Using the standard ensures the maximum possible compatibility with email servers and email readers.

    Closing this as a duplicate of your other issue.

  • πŸ‡ΊπŸ‡ΈUnited States jimmb

    Thanks for the info, and I understand now. It would be nice if this was part of your README file or project description, so it's more clear what this module does and doesn't do. In this case, it would have saved me various stages of testing and ultimately feeling like I had to post this support request. Anyway, thanks again for the help and I will proceed via the original issue.

Production build 0.71.5 2024