Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi,
I put the "HTML" option in the newsletter module and the smtp module but my confirmation message appears with all the HTML tags in my mailbox.
What's wrong??
Comment | File | Size | Author |
---|---|---|---|
#34 | issue.jpg | 104.89 KB | Drupppie |
#30 | 1388378-SMTP_html_emails-30.patch | 1023 bytes | ParisLiakos |
Comments
Comment #1
sophie30 CreditAttribution: sophie30 commentedComment #2
ParisLiakos CreditAttribution: ParisLiakos commenteddoes it work,if you disable smtp?
Comment #3
sophie30 CreditAttribution: sophie30 commentedIf i diable smtp module and i disable the checkbox "Enable SMTP support" in newsletter module, the mail is not send...
Comment #4
ParisLiakos CreditAttribution: ParisLiakos commenteddoes any mail is being sent from the site at all?
Comment #5
sophie30 CreditAttribution: sophie30 commentedI don't know if I understand your request...If I disable smtp module, in the newsletter module there is a message of success when I send a test, but the email is not send...But when I put the smtp module on "On", it's ok, the mails are send but with all html tags
Comment #6
ParisLiakos CreditAttribution: ParisLiakos commentedUnfortuantely, smtp doesn't handle the mail variable with the best possible way.
see this issue here : #1201198: Don't reset mail system variable
You ll have to uninstall newsletter and then reinstall it to fix the variable,or use the devel module.but keep smtp enabled.
after it is reistalled does test mail deliver?
Comment #7
sophie30 CreditAttribution: sophie30 commentedOk, I'm going to try the dev version of your module. So, if I understand, I have to uninstall my newsletter module, but must I do uninstall the smtp module too??
Comment #8
ParisLiakos CreditAttribution: ParisLiakos commentedno,keep smtp enabled:)
Comment #9
sophie30 CreditAttribution: sophie30 commentedI have just installed the dev version, and there is the HTML format activate but there is the same problem, my email are like this :
Comment #10
ParisLiakos CreditAttribution: ParisLiakos commentedthats very weird....
can you tell me the contents of
mail_system
variable?use the devel module http://drupal.org/project/devel and its variable editor
Comment #11
Road Runner CreditAttribution: Road Runner commentedI can confirm everything Sophie said. I am using latest Dec 20 .dev module. When smtp installed (yes I did it first and enabled it prior to installing Newsletter) smtp has a test email which does work with the email server I selected. So far so good. After that it is pretty much as Sophie said. Your module has promise but right now nothing. Also no way to resend email - I mentioned this before without this it isn't a production system. This is critical. FYiI, I am playing with Simple News, phpList and yours.
FYI when I look at headers of html email they say
X-Mailer: PHPMailer 5.1 (phpmailer.sourceforge.net)
Mime-Version: 1.0
Content-Transfer-Encoding: 8Bit
Content-Type: text/plain; charset="utf-8"
Maybe that will help as I believe when I look at headers of html email that comes through correctly it says something like the following
Content-Type: multipart/mixed; boundary="5794e8c2c8f...................."
Content-Transfer-Encoding: 8Bit
X-Mailer: Drupal
Priority: normal
Comment #12
sophie30 CreditAttribution: sophie30 commentedI installed it (the devel module) but where is the variable editor ??
Comment #13
ParisLiakos CreditAttribution: ParisLiakos commented@sophie30 under
devel/variable
@Road Runner sorry,but smtp is a whole different module and unfortunately not well maintained.also i dont have any smtp capable server to test against.so its a bit difficult to know whats going on.That said if you see critical things missing you are welcomed to sponsor their development or start sharing some patches:)
Comment #14
Road Runner CreditAttribution: Road Runner commentedHi thanks for prompt response. FYI, Even without smtp module installed html doesn't work.
Comment #15
sophie30 CreditAttribution: sophie30 commentedI'm sorry but I don't understand this, I can't find this...:-(
Comment #16
ParisLiakos CreditAttribution: ParisLiakos commented@Road runner if it doesnt work then it is a bug.can you tell me the
mail_system
variable contents?@sophie30 after you install devel there is a block available called
Development
.enable it.the last link in the block is Variable editor.There you can find the variableComment #17
Road Runner CreditAttribution: Road Runner commentedsure, where do I find mail_system variable
Comment #18
ParisLiakos CreditAttribution: ParisLiakos commentedinstall devel module and then navigate to
devel/variable
pathComment #19
Road Runner CreditAttribution: Road Runner commentedwith smtp module uninstalled and newsletter module installed this is what I see.
a:1:{s:14:"default-system";s:17:"DefaultMailSystem";}
With smtp module installed but newsletter module uninstalled
a:1:{s:14:"default-system";s:14:"SmtpMailSystem";}
Comment #20
ParisLiakos CreditAttribution: ParisLiakos commentedthats what i thought..smtp resets the variable -.-
sigh i think i should remove smtp support for now.
well to fix this do the following:
1) Disable newsletter.
2) Uninstall newsletter
3) Enable smtp
4) Enable newsletter.
5) check the variable.There should be a NewsletterMailSystem in there.
6) newsletter module can now send html email.
Alternatively,If you dont want to lose your newsletter data,run this php code into the execute PHP block devel provides:
Comment #21
Road Runner CreditAttribution: Road Runner commentedNow with smtp installed and now newsletter installed this is what i get
a:2:{s:14:"default-system";s:14:"SmtpMailSystem";s:10:"newsletter...
when I click edit I see the following
Array
(
[default-system] => SmtpMailSystem
[newsletter] => NewsletterMailSystem
)
BTW, it is moot point because I still can't test a newsletter multiple times before sending to the list. For large mailings need smtp to redirect to a server with no throttle and for email marketers they need to be able to test and retest until final product is ready. Without these it isn't a production ready module.
Comment #22
ParisLiakos CreditAttribution: ParisLiakos commentedI want to help:) so help me understand the problem.
1) Now,can you send html mails without smtp? (smtp checkbox unchecked)
2) if yes, when you check smtp, mail still sends but html fials?
Comment #23
Road Runner CreditAttribution: Road Runner commentedOK. I have some other stuff that I have to do but here is first cut.
Only Newsletter is installed ( I uninstalled smtp)
Using Send Test on the newsletter setting tab I looked at header in the email I received and this is what I got. There is no html in your ttest email you might want to include that in future.
X-Mailer Drupal
Text/plain
8-bit encoding
Then using your default template to which I added some basic html and a couple of email addresses for test purposes I sent using the choice to send under the Create/Send tab.
I added some html t this template the one shown as default. then sent and ran cron manually.
No Email Received in this scenario.
Comment #24
ParisLiakos CreditAttribution: ParisLiakos commentedsmtp ruined the variables again.
when you disable it,it resets the variable again.check it in the devel variable editor to be sure
Comment #25
ParisLiakos CreditAttribution: ParisLiakos commentedclosing this as duplicate of #1201198: Don't reset mail system variable since smtp is clearly the problem here and the stupid variable resetting.sorry cant do much,i just hope that my patch gets commited soon,over to smtp,so you people using SMTP can start using Newsletter module
Comment #26
ParisLiakos CreditAttribution: ParisLiakos commentedComment #27
rurri CreditAttribution: rurri commentedI can confirm the same issue. The e-mails are being received in the editor as plain text, which causes all of the HTML tags to show.
This only happens when sending mail via the SMTP module.
This is fixed with the following line added to newsletter.mail.inc in the function mail in the if block for the smtp module
It looks like the content type needs to be set in the header in order for this to work.
Comment #28
rurri CreditAttribution: rurri commentedJust to clarify, the block that needs to be added to the if block is:
Sorry for lack of patch, I downloaded the module as a tar ball, so would require a bit of setup just to make this patch..
Comment #29
ParisLiakos CreditAttribution: ParisLiakos commentedhmm interesting..thanks a lot for taking the time rurri
Comment #30
ParisLiakos CreditAttribution: ParisLiakos commentedpatch attached
Comment #31
rurri CreditAttribution: rurri commentedTook a look at the patch. Looks good, and better than repeating the code, pulling it up on top of the if block is much better since it needs to be set regardless of the way the e-mail is eventually being sent.
Comment #32
ParisLiakos CreditAttribution: ParisLiakos commentedthanks a lot rurri, i commited the patch
cheers
Comment #34
Drupppie CreditAttribution: Drupppie commentedHi all,
I am using the latest newsletter module + smtp module.
Unfortunately i had to instal the smtp module second.
My newsletters appear with html tags, not in the html format.
I have all narrowed it down to the text in the header: Content-Type: text/plain; charset="utf-8" and not Content-Type: text/html; charset="utf-8".
Now, applying the fix for the "mail_system" variable works. The newsletters appear in html format, but I get and error:
PDOException: in field_sql_storage_field_storage_write() (line 448 of /var/www/html/test/modules/field/modules/field_sql_storage/field_sql_storage.module).
and also the newsletter in report appear as sending (not sent) - so every time i run cron they get resent.
Any suggestions?