HTML MAIL feature is not working correctly. Some of the users are not receiving email. It is important as these are the account confirmation emails.
Error Message : "The mailsystem_html_to_text() function did not return any text. Please report this error to the Mail system issue queue."
I am trying to send a HTML email. The message body has some HTML Code. I am getting the above error and email is not sent to the user.
// Retrieve the responsible implementation for this message.
$system = drupal_mail_system($module, $key);
// Format the message body.
$message = $system->format($message);
// Send e-mail.
$message['result'] = $system->mail($message);
Comment | File | Size | Author |
---|---|---|---|
#8 | mailsystem.JPG | 268.97 KB | lilott8 |
#2 | mailsystem-empty-conversion-warning-1494910-2.patch | 481 bytes | pillarsdotnet |
Comments
Comment #1
mshettar CreditAttribution: mshettar commentedUpdating priority.
Comment #2
pillarsdotnet CreditAttribution: pillarsdotnet commentedPlease do this:
/admin/reports/dblog
page for a message with type =mailsystem
.Thank you.
Comment #3
pillarsdotnet CreditAttribution: pillarsdotnet commentedComment #4
lilott8 CreditAttribution: lilott8 commentedI've just added the patch and will await the next email to go out. When that happens I will upload the message for you.
I am using php 5.4. Also your patch doesn't function. I had to tweak it to read:
I was getting a cannot use return value as write context errors.
Comment #5
lilott8 CreditAttribution: lilott8 commentedHere are some logs:
This is what was sent:
Feb 27 08:38:55 www01 drupal: [obscured]|1361975935|directory|71.194.100.182|[obscured]/directory/profile/[obscured]|[obscured]/directory/profile/[obscured]|0||Directory webform sent [obscured]: [obscured] [obscured] : Hedirectory_webformi_Files @ [obscured] Saying: #012Hi [obscured] #012#012[obscured] is dressing up be like you [obscured] day, and she has a small pillow under her shirt mimick your baby bump. We hope that this is okay. She really wants look like you day, and she doesn't mean any disrespect. We hope that's okay. I imagine she will take out the pillow early on in the morning.#012#012Have a wonderful day!#012#012Hedirectory_webformi Files#012Sender's IP: [obscured]
note: I put the purplemonkeys in there for easy search.
Comment #6
lilott8 CreditAttribution: lilott8 commentedIs this dead? Because people are getting empty emails from us! Please, we've tried just about everything. I've even modified some of the code to try and avert this...
Comment #7
SKAUGHT'it seems' that you need mail_system variable to be setup as (use /admin/config/system/mailsystem to setup).
a Variable dump of mail_system:
then drupal_mail works (yes, 'htmlmail' even though you expect to use YOUR-MODULE):
=============
follow up: my third list point seems not to set it.. sending a test [ /admin/config/system/htmlmail/test ] seems to set var for mail_system([htmlmail] => HTMLMailSystem )
themed mail tpl to use:
htmlmail--htmlmail--YOUR-KEY.tpl.php
Comment #8
lilott8 CreditAttribution: lilott8 commentedYou can see my setup for the mailsystem. It's been working really well for at least a year. It just started randomly sending blanks to people. I have the following installed:
As far as I can tell, it is installed and configured according to the readme.txt file.
Comment #9
dgtlmoon CreditAttribution: dgtlmoon commentedthis can be caused by something using drupal_mail incorrectly.
Comment #10
pwsherman CreditAttribution: pwsherman commentedI'm also getting this message in my HTMLMail system logs, but mails seem to be going out.
Comment #11
supriyarajgopal CreditAttribution: supriyarajgopal commentedSubscribing..I am facing the same issue!
Comment #12
sodu.parsiev CreditAttribution: sodu.parsiev commentedthis error happens at this place
http://storage5.static.itmages.com/i/16/0422/h_1461343011_6704826_7ea583...
To prevent this error you should in hook_mail set message body.
Comment #13
prathamesh T. CreditAttribution: prathamesh T. commentedOne of the reason can be broken html at some point will cause for this error.
In my case there was one closing tag was missing in my html, which i was passing to function so it was returning me this error.
Comment #14
miguel.delcampo CreditAttribution: miguel.delcampo commentedHi, i have installed Mail System v. 7.x-2.34 in Drupal and it seems that the bug continues.
Does anyone know the reason why this problem occurs?
It is planned to correct this bug in a future version?
Thank you very much.
Comment #15
nitheesh CreditAttribution: nitheesh at O8 commentedseems to be related - https://www.drupal.org/project/mailsystem/issues/1976716
Comment #16
apaderno