Posted by michaeltt on April 15, 2009 at 2:14pm
| Project: | Mass Contact |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Issue Summary
Using Drupal 6, and the most recent modules of Mass Contact, Mime Mail and Mime CSS container enabled.
I am trying to send Mass Contact emails, but they come through without html. I am using Mime Mail (which works fine for mail sent from the site). Mass contact (using html option) looks somewhat like this.
--------------
This is a multi-part message in MIME format. --04b44369af6a4068581e4b35e4811105 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Tested --04b44369af6a4068581e4b35e4811105 Content-Type: text/html; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit
Tested
Any ideas what is going on?
Comments
#1
The 6.x version of Mass Contact does not currently work with Mime Mail.
#2
How can I eliminate any MIME settings so that language does not go out on all my emails?
Thanks,
Andrew
#3
Never mind, figured it out. I disabled the MIME settings on our site and it works fine now.
#4
#5
Hi ,
I am having the same problem, can you please tell me how you disabled the mime settings?
#6
I hope this is the correct place to insert a "finding" on this matter. I was struggling to get Mass_contact module to work. Then when reading this particular ticket, I tried using the Mass_contact in Plain Text mode. It worked GREAT!
So, suddenly the problem I thought was a "false SPAM" was in fact a problem with MIME headers...
I only know enough to be dangerous. So, I'm leaving this thought and finding here for the "Big Guns" to review..
After TON's of debugging, I found that the drupal_mail() call was the problem. Specifically the Header's. The messages where getting sent, but the headers were not good and thus the mail messages where getting dumped at the server. This explains why the on screen messaging that says your email was sent is being displayed. They are being sent, it's just not good stuff..
When I make the following change within the drupal_mail() function found in the includes/mail.inc file... HTML mail and plain text mail worked GREAT. So did Attachments..
Specifically I commented OUT the 'Content-Type' entry that was there, and used one of the one's that have been successful when making non-Drupal sites.
// Build the default headers$headers = array(
'MIME-Version' => '1.0',
// 'Content-Type' => 'text/plain; charset=UTF-8; format=flowed; delsp=yes',
'Content-Type' => 'text/html;',
'Content-Transfer-Encoding' => '8Bit',
'X-Mailer' => 'Drupal'
);
Everything works now... Somebody who knows more .. might be able to explain why..
#7
Cheers! I needed to set the mail.inc to this:
'Content-Type' => 'text/html; charset=UTF-8;','Content-Transfer-Encoding' => '7Bit',
In order to get html email displaying German characters.
In case anyone wants the German characters for html, here is an example:
Hallo !username,<br>
Sie haben sich gerade bei !site registriert. Bitte melden Sie sich als nächstes ein unter <a href="!login_uri">hier</a>. <br>
Benutzen Sie dazu folgenden Benutzernamen mit dem nur einmal gültigen Passwort:<br><br>
Benutzername: !username<br>
Passwort: !password<br><br>
Sie können sich auch per Klick auf folgenden Link anmelden oder alternativ kopieren Sie die Linkadresse in Ihren Browser: <a href="!login_url">!login_url</a><br>
Nach dem Anmelden verföllt das Passwort und Sie werden nach <a href="!edit_uri">!edit_uri</a> umgeleitet, um sich ein neues Passwort zu vergeben.<br><br>
Beste Grüße -- Ihr !site Team<br>
From the user/settings Welcome, "No Approval required" body.
#8
I'm setting this to reflect the original poster's message.
Everyone else please create a new issues for your problems.
#9
For htmlmail.module users who stumble across this issue, I can confirm that Mass Contact 6.x also does not work with HTML Mail.
#10
Further to my previous comment, I've discovered that if HTML Mail is enabled *and* Mass Contact is configured to *not* send html emails, then the emails that are sent will be in html format. Hope this helps somebody, and it may actually work with MIME Mail as well (?).
#11
@ryan_courtnage .. Thank you for that information.
Can you confirm that after setting up Mass contact to NOT send html emails and then sending an email through this module, the emails are in fact in html format?
#12
@Ela, that is correct
#13
Thank you Ryan. Testing it now. It seems that it works, but if you add an image to your email with regular html, then the image does not display, instead it displays the html code in the email.
I can deal with that for now I guess.
#14
Subscribe
#15
Subscribe. I'd like this module to behave well with htmlmail.module.
#16
OK, I wanted this to work at least with HTMLMail and the WYSIWYG filter with TinyMCE, as that is how my client is branding outgoing eMails. So I created the attached patch (which also includes a couple of other minor fixes, such as the message body not saving when there's an attachment) so that at least this works with HTMLMail. I've tried it, and it works on my site. Please review and let me know what folks think.
NOTE: This patch is against the 1.0 version, as that's the one I'm using on my site.
Shawn
#17
Important information: If you use mimemail module and DEACTIVATE HTML support in mass_contact module, mimemail styles the mail absolutely properly.
Sending attachments doesn't work in my case.