I'm getting an error on my Status Report page stating:

Printer, email and PDF versions - Send by email
Incompatible Mail System setting detected
The send by email module requires the use of the DefaultMailSystem, please configure it in the Mail System Settings page.

So, I want to create a new "Class" and I find the send by email module in the dropdown list.

What do I put in there for the "Key" for that module? Does each module already have one implmented in it's code or do I just make something up that can't possibly be used by another module like "sendbymail123XYZyeah"?

The limited overview/instructions state the key part is optional, but what does it do and what is my next step?

Comments

Anonymous’s picture

I had the same question. 'KEY' is not document anywhere on mailsystem documentation. I have found out that it is required for use with the webform module;

In order to get webform to work with SMTP auth mail delivery module, you will need to set the webform module and its key on MailsSystem's configuration page;

Module      -> WebForm
Key            -> submission
Delivery     -> SmtpMailSystem
Formatter  -> SmtpMailSystem

'KEY' seems to be defined as the name of the; form action, action or mail handler sub-module of the module sending the email. I am not sure either? but i would also like some clarification on this.

deanflory’s picture

I'm totally surprised no maintainer can answer this simple and required question that explains 1 out of 3 fields for this module. More than a year now. Here's what I found with a search:

http://www.beyondspotsanddots.com/how-use-drupals-mail-system-module-d7-2x

Formatting Your Emails

I use the HTMLMail module for formatting emails in HTML if they need to be. HTMLMail contains template files which can be moved into your default theme, thus overriding the templates contained in the module itself. One of the main reasons I like HTMLMail is because of its built-in templating hint system, which works like this:

  • htmlmail.tpl.php is the default HTMLMail template
  • htmlmail--module_name--key.tpl.php overrides the default template for specific emails. For example, a Webform submission notification email has the module name "webform" and a mail key of "submission", which means if you want to have a unique look-and-feel for a Webform submisison email, your template will look like this: htmlmail--webform--submission.tpl.php.

You can create a custom module—let's say it's called example.module—that sends a special type of notification. If we want it to look different from other emails, we can create a template called htmlmail--example.tpl.php, which will theme all emails sent by this module, or, for example, htmlmail--example--special_notification.tpl.php for any email with the mail key "special_notification".

berdir’s picture

Status: Active » Fixed

That's because there is no maintainer (For 7.x, anyway). You might have noticed that there were a handful of commits last august and nothing before for more than a year.

And also because the issue queue is a crappy support system, I'd recommend to use Drupal answers which has a bunch of easily findable answers about this topic: http://drupal.stackexchange.com/search?q=mail+key.

deanflory’s picture

Thanks Berdir!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

aiphes’s picture

Hy

FYI, the key is the ID of the form, and you can find it on the admin/structure/webform/manage/ID/settings page.
Then you get it in the general parameters section.