Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
I've installed HTML mail, simplenews and SMTP Authentication support. The test email from SMTP Auth works fine but if I try to send a newsletter from simplenews, all I get is plain text. If I pick any mail systems settings but SMTPMailSystem the emails won't send. Any ideas what I'm doing wrong?
Thanks
Sharon
Comment | File | Size | Author |
---|---|---|---|
#24 | debug.txt | 461.17 KB | SharonD214@aol.com |
#23 | htmlmail-debug_message_failure-1140052-23.patch | 2.6 KB | pillarsdotnet |
#23 | htmlmail-debug_message_failure-1140052-23.tgz | 19.89 KB | pillarsdotnet |
#23 | htmlmail-debug_message_failure-1140052-23.zip | 32.47 KB | pillarsdotnet |
#10 | htmlmail_smtpmail_mail_system_2.png | 95.88 KB | pillarsdotnet |
Comments
Comment #1
Darkplek CreditAttribution: Darkplek commentedIt sounds like I have the same problem (sorry I can't actually help!)
I'm using this module to allow me to test email whilst developing on localhost, currently. I'm using Ubercart, which defines HTML templates for emails that get used by default. When using this module all that is actually sent is a big mash of plain text with all the html removed....
I'd appreciate any suggestions, quite urgently.
Comment #2
pillarsdotnet CreditAttribution: pillarsdotnet commentedSo you're using HTMLMailSystem for formatting but SMTPMailSystem for sending?
Comment #3
SharonD214@aol.com CreditAttribution: SharonD214@aol.com commentedWell, I wasn't but tried setting it this way and now get the following error message:
Fatal error: require_once() [function.require]: Failed opening required 'C:\wamp\www\drupal/C:\wamp\www\drupal\sites\nabn\files\mailsystem/HTMLMailSystem__SmtpMailSystem.mail.inc' (include_path='.;C:\php\pear') in C:\wamp\www\drupal\includes\bootstrap.inc on line 2724
Any idea how to fix this? I get the same message if I try to configure HTML Mail, Mail System or SMTP Authentication Support
Sharon
Comment #4
SharonD214@aol.com CreditAttribution: SharonD214@aol.com commentedok, Tossed the mailsystem folder and at least I'm not getting the error message on every page any more, but what I had was site-wide default as SMTPMailSystem and HTMLMAilSystem or SMTPMAilsystem as the HTML Mail Module class set in the Mail system.
Sharon
Comment #5
pillarsdotnet CreditAttribution: pillarsdotnet commentedThat error is due to a bug in Mail System module. I'm working on it; thanks.
Comment #6
pillarsdotnet CreditAttribution: pillarsdotnet commentedFixed in 7.x-2.27 release, I hope. Please test, as I don't have a Windows system to verify.
Comment #7
SharonD214@aol.com CreditAttribution: SharonD214@aol.com commentedBe glad to, Mail will not send from localhost, unless I have site-wide default and HTML mail module class set to SMTPMailSystem - and then it is only plain text when sending HTML mail test email. Should I set something under new class and new setting or does HTML mail not work locally?
Sharon
Comment #8
pillarsdotnet CreditAttribution: pillarsdotnet commentedOkay, thoroughly tested this and found errors in all three participating modules.
Fixed in Mail System 7.x-2.28 and HTML Mail 7.x-2.58.
Had to patch SMTP Authentication Support. See #1199966-1: The Content-Type header is incorrectly parsed in SmtpMailSystem::mail() function.
The enclosed screenshots show how I configured a test system to format mails using HTML Mail and send them using SMTP Authentication Support.
Comment #9
pillarsdotnet CreditAttribution: pillarsdotnet commentedComment #10
pillarsdotnet CreditAttribution: pillarsdotnet commentedMissed a screenshot in the above list.
Comment #11
pillarsdotnet CreditAttribution: pillarsdotnet commentedCreated a documentation page listing all the steps required to get this working.
Comment #12
SharonD214@aol.com CreditAttribution: SharonD214@aol.com commentedok - I updated a patched everything as noted in #8. I don't have Mail MIME or Include modules installed (not sure if I need them for it to work properly, if so I'll install them). All the other modules are installed. I tried setting up the mail_system as noted and got the followin message
PDOException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'HTMLMailSystem__SmtpMailSystem-class' for key 'PRIMARY': INSERT INTO {registry} (name, type, filename, module, weight) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4); Array ( [:db_insert_placeholder_0] => HTMLMailSystem__SmtpMailSystem [:db_insert_placeholder_1] => class [:db_insert_placeholder_2] => sites\nabn\files\mailsystem\HTMLMailSystem__SmtpMailSystem.mail.inc [:db_insert_placeholder_3] => mailsystem [:db_insert_placeholder_4] => 0 ) in _registry_parse_file() (line 179 of C:\wamp\www\drupal\includes\registry.inc).
The website encountered an unexpected error. Please try again later.
and then when trying to go to any other page I get:
Fatal error: require_once() [function.require]: Failed opening required 'C:\wamp\www\drupal/C:\wamp\www\drupal\sites\nabn\files\mailsystem/HTMLMailSystem__SmtpMailSystem.mail.inc' (include_path='.;C:\php\pear') in C:\wamp\www\drupal\includes\bootstrap.inc on line 2724
until I deleted the mailsystem folder from my files folder
Thanks
Sharon
Comment #13
pillarsdotnet CreditAttribution: pillarsdotnet commentedThere is a record in your registry that has a bad path.
Running the following code from PHP filter should clear up the problem:
While slightly more drastic, the following should also work:
Comment #14
SharonD214@aol.com CreditAttribution: SharonD214@aol.com commentedok, I've removed the offending issue from the registry and have everything setup as shown above, but after trying to send the test email from HTML mail, I get the following messages and no email is received.
HTML Mail test message sent.
Error message Unable to send e-mail. Contact the site administrator if the problem persists.
However test email from SMTP auth works fine and is HTML formatted.
Sharon
Comment #15
pillarsdotnet CreditAttribution: pillarsdotnet commentedDid you select the
HTMLMailSystem__SmtpMailsystem
class for bothsite-wide (Default)
andHTML Mail
as shown in the screenshot?Comment #16
SharonD214@aol.com CreditAttribution: SharonD214@aol.com commentedyes, I did.
Sharon
Comment #17
pillarsdotnet CreditAttribution: pillarsdotnet commentedI'm glad that this is mostly working for you. You've been a tremendous help so far. Could you please check your watchdog log for any clue as to why the HTML Mail test message did not send, and paste the results here? I'd like to fix that last little problem if I can.
Comment #18
SharonD214@aol.com CreditAttribution: SharonD214@aol.com commentedHere's what I've got from my dblog
TYPE mail
DATE Monday, June 27, 2011 - 19:40
USER SharonD214
LOCATION http://nabn/drupal/admin/config/system/htmlmail/test?render=overlay&rend...
REFERRER http://nabn/drupal/admin/config/system/htmlmail/test?render=overlay
MESSAGE Error sending e-mail (from xx@aol.com to xx@aol.com).
SEVERITY error
HOSTNAME 127.0.0.1
OPERATIONS
Hope this helps.
Sharon
Comment #19
pillarsdotnet CreditAttribution: pillarsdotnet commentedCan you also check the "debug" box in the SMTP module settings page and try again?
Comment #20
SharonD214@aol.com CreditAttribution: SharonD214@aol.com commentedok -
The log message is the same except the location and referrer end at "test". Any place else I should be looking?
Sharon
Comment #21
pillarsdotnet CreditAttribution: pillarsdotnet commentedWeird. So... I wonder where the error message is coming from? Because if SMTP is producing the error, then you should see a whole BUNCH of screen output. And if HTML Mail is producing the error, then MailSystem is not doing its job.
My dblog normally reports a filename and line number. Yours obviously works differently. Are you logging to database or syslog? Can you try with overlay turned off?
Comment #22
SharonD214@aol.com CreditAttribution: SharonD214@aol.com commentedI used Komodo Edit to search for the error message. It is coming from line 156 of mail.inc that resides in my drupal\includes folder. I'm not sure how my system is logging errors,
I'm kind of new to drupal and haven't set that up. I just looked in the reports section and selected recent log messages and that is what I see. My logging and errors section is supposed to record all errors and up to 1000 log messages, but I don't see any filename and line numbers. I usually get a filename and line number on the page where there is an error but no with this one.
No change when turning noff the overlay.
Sharon
Comment #23
pillarsdotnet CreditAttribution: pillarsdotnet commentedI want to thank you for your patience and determination to see this through. I'm still trying to figure out why, but it's definitely HTML Mail that is failing to send, whereas SMTP should be handling the sending.
Here is a patched version of HTML Mail that provides better debugging in case of message failure. Could you try using it, and then pasting the resultant watchdog message here?
Thanks so very much. I wouldn't be able to troubleshoot this on my own.
Comment #24
SharonD214@aol.com CreditAttribution: SharonD214@aol.com commentedok - It's really long and I've edited some client info and emails out and attached as a file. There is also another issue. When registering a new user I'm getting the original email message to be emailed followed by:
To customize this message:
For module-specific customization, copy
sites/all/modules/htmlmail/htmlmail.tpl.php
to
sites/default/themes/default/htmlmail--user.tpl.php
For message-specific customization, copy
sites/all/modules/htmlmail/htmlmail.tpl.php
to
sites/default/themes/default/htmlmail--user--register_pending_approval.tpl.php
Edit the copied file.
Send a test message to make sure your customizations worked.
If you think your customizations would be of use to others, please contribute your file as a feature request in the issue queue.
The user module sets the $params variable. For this message,
$params =
( ! ) Fatal error: Nesting level too deep - recursive dependency? in C:\wamp\www\drupal\sites\default\themes\default\htmlmail.tpl.php on line 170
Call Stack
# Time Memory Function Location
1 0.0017 401616 {main}( ) ..\index.php:0
2 2.4216 35177816 menu_execute_active_handler( ) ..\index.php:21
3 2.4219 35178304 call_user_func_array ( ) ..\menu.inc:503
4 2.4219 35178488 drupal_get_form( ) ..\menu.inc:0
5 2.4219 35178952 drupal_build_form( ) ..\form.inc:187
6 2.4355 35849848 drupal_process_form( ) ..\form.inc:349
7 2.5899 38830720 form_execute_handlers( ) ..\form.inc:829
8 2.5899 38835816 logintoboggan_user_register_submit( ) ..\form.inc:1389
9 6.3617 57309552 _user_mail_notify( ) ..\logintoboggan.module:521
10 6.3618 57311088 drupal_mail( ) ..\user.module:3430
11 6.4025 57315712 HTMLMailSystem__SmtpMailSystem->format( ) ..\mail.inc:147
12 6.4026 57315712 HTMLMailSystem->format( ) ..\HTMLMailSystem__SmtpMailSystem.mail.inc:20
13 6.4028 57317696 theme( ) ..\htmlmail.mail.inc:51
14 6.4041 57351280 theme_render_template( ) ..\theme.inc:937
15 6.4352 57428184 include( 'C:\wamp\www\drupal\sites\default\themes\default\htmlmail.tpl.php' ) ..\theme.inc:1247
16 6.4367 57429024 var_export ( ) ..\htmlmail.tpl.php:170
This is supposed to redirect to a paypal page and was working fine before - no email is sent either
Sharon
Comment #25
SharonD214@aol.com CreditAttribution: SharonD214@aol.com commentedOne other thing, in the Mail system configuration, the HTML module class does not remain set at HTMLMailsystem_SmtpMailSystem, but switches itself back to HTMLMail system.
Sharon
Comment #26
pillarsdotnet CreditAttribution: pillarsdotnet commentedThe current version of
htmlmail.tpl.php
usesprint_r()
instead ofvar_export()
in order to avoid this kind of fatal error.The debug checkbox is causing the extra information to be printed. You can disable it by visiting your HTML Mail settings page at
admin/config/system/htmlmail
.Please also visit your Mail System settings page at
admin/config/system/mailsystem
and make sure that theHTMLMailSystem__SmtpMailSystem
class is specified for all$module
/$key combinations. Based on the information you provided, I believe thatHTMLMailSystem
is currently specified forhtmlmail
/test
. This would explain why your test messages are not being sent via SMTP.I'm sorry that the debugging output was unnecessarily verbose, but I wanted to make sure I got enough information. I'll be releasing a new version of HTML Mail shortly incorporating some of the improvements related to this issue.
Again, do please un-check the "Debugging" option in both HTML Mail and SMTP Authentication Support in order to get your emails working properly.
Thank you very much for helping to make this module better for everybody.
Comment #27
pillarsdotnet CreditAttribution: pillarsdotnet commentedReleased 6.x-2.59/7.x-2.59/8.x-2.59 of HTML Mail.
Comment #28
SharonD214@aol.com CreditAttribution: SharonD214@aol.com commentedHmm, updated to 7.x-2.59 release and got the following
( ! ) Parse error: syntax error, unexpected '}' in C:\wamp\www\drupal\sites\all\modules\htmlmail\htmlmail.mail.inc on line 283
Call Stack
# Time Memory Function Location
1 0.0028 367464 {main}( ) ..\index.php:0
2 0.0197 908480 drupal_bootstrap( ) ..\index.php:20
3 0.1744 6137592 _drupal_bootstrap_full( ) ..\bootstrap.inc:1934
4 1.0516 34212496 module_invoke_all( ) ..\common.inc:4937
5 1.0610 34392520 call_user_func_array ( ) ..\module.inc:819
6 1.0610 34392656 mailsystem_init( ) ..\module.inc:0
7 1.0610 34392656 mailsystem_get_classes( ) ..\mailsystem.module:17
8 1.0804 34632456 drupal_autoload_class( ) ..\mailsystem.module:286
9 1.0804 34632504 _registry_check_code( ) ..\bootstrap.inc:2649
10 1.0804 34632536 class_exists ( ) ..\bootstrap.inc:2669
11 1.0804 34632752 drupal_autoload_class( ) ..\bootstrap.inc:0
12 1.0804 34632800 _registry_check_code( ) ..\bootstrap.inc:2649
Sharon
Comment #29
pillarsdotnet CreditAttribution: pillarsdotnet commentedThe previous line is lacking a semicolon. (sigh)
Fixing...
Comment #30
pillarsdotnet CreditAttribution: pillarsdotnet commentedReleased 6.x-2.60 / 7.x-2.60 / 8.x-2.60.
Comment #31
SharonD214@aol.com CreditAttribution: SharonD214@aol.com commentedWorks!, now I just need to format my theme properly :)
Thanks
Sharon
Comment #32
pillarsdotnet CreditAttribution: pillarsdotnet commentedYay!!!!!
(/me does the happy-dance)