Closed (fixed)
Project:
Webform
Version:
7.x-3.9
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
11 Jul 2012 at 07:59 UTC
Updated:
13 Jun 2013 at 04:02 UTC
There is a standard TXT e-mail. It would be great with a standard HTML e-mail also. E.g. drupal.org/project/mandrill sends in html as a standard. Doing that makes i really har do read the TXT-email as everything is on one line.
Comments
Comment #1
quicksketchYou can install http://drupal.org/project/mimemail to send HTML-based e-mail with Webform. I'm not sure if it is compatible with Mandrill at the same time or not.
Comment #2
quicksketchTo clarify, we only have a single check in Webform that identifies if an HTML-based e-mail solution is installed, then everything else checks it. In theory we could expand the function, or (as suggested in the current code's TODO), provide a hook for other modules to indicate to Webform that they support HTML. See http://api.drupalize.me/webform_email_html_capable
Comment #3
lsolesen commentedOr webform could support the mailsystem module which lets the users decide which class to use for sending e-mails?
Comment #4
quicksketchWebform already supports Mailsystem (since Mailsystem is usable with ALL mails in all of Drupal). The thing that's not clear with Mailsystem is which mail classes provide HTML abilities. So again, this comes back to webform_email_html_capable(), and adding either a hook there or an explicit check for Mandrill.
Comment #5
nightlife2008 commentedIn the meanwhile I quickfixed my webform.module to support HTMLMail module as follows:
Comment #6
quicksketchThanks @nightlife2008. This actually looks pretty close to an accpetable approach. I would suggest just moving the
if ($enable) {block outside the module checks so you don't have the same 7 lines of code in both places.Comment #7
nightlife2008 commentedJup, should perhaps first determine the mailsystem class, and set it once to the webform mailsystem.
Then that variable could be hooked for other modules?
Comment #8
amberau79 commentedIsn't there any way to bump this? There's still no hook when this problem was reported in July 2012? I'd really rather not hack the module to support Mandrill emails, which is surely a pretty common requirement?
Comment #9
quicksketch@amberau79: Yes, you can provide a patch that incorporates the feedback in #6.
Comment #10
quicksketchSo it looks like this issue actually has nothing to do with supporting "Mandrill" so much as providing support for HTMLMail (as the suggested changes in #5 show). You can use MIMEMail today with Mandrill module to send HTML e-mails through Mandrill. Support for HTMLMail already has a separate issue at #1267142: webform_email_html_capable should also check for existence of htmlmail module.
So basically, you can use whatever module you want to *send* the e-mails, including SMTP module or Mandrill. Webform uses MIME Mail module to *format* the e-mail before it is sent. Likewise HTML Mail provides this functionality too, but it's not yet supported. This issue therefor can be merged with #1267142: webform_email_html_capable should also check for existence of htmlmail module, since that what we're really talking about here.