Thanks for providing this great module!

I've taken it a step or 2 further, and have added the option to send raw emails (MIME formatted) so that images and attachments can now be added inline using mimemail.

I've also added an option for DKIM signing to improve deliverability and reduce the chances of your message being flagged as spam.

These options are available via the attached patch file for 6.x-1.0 I was initially going to create a separate add-on module, but figured that it would make more sense to try to keep these edits as part of the main project, assuming the maintainer is okay with including them.

Suggestions / bug reports most welcome.

Details on how to install:

In order to enable sending RAW MIME-encoded messages, you will need to have the mimemail module installed and configured.

http://drupal.org/project/mimemail

IMPORTANT:
There are several bugs in the current version of mimemail which may cause issues when used with Amazon SES.
You may need to include the following patches if they have not yet been integrated into mimemail:

http://drupal.org/node/1270656
http://drupal.org/node/1270686

DKIM support:

DKIM allows you to cryptographically sign your emails to increase deliverabilty and reduce the chances of your messages being marked as spam.

To enable DKIM support with Amazon SES, you must download the php-mail-domain-signer package:
http://code.google.com/p/php-mail-domain-signer

Place the lib folder within the amazon_ses directory.

Visit the amazon_ses configuration page in order to set up the details necessary for using DKIM, including entering your private key, which you will need to generate separately.
You will also need to correctly configure your DNS records.

For additional information, please see:
http://code.google.com/p/php-mail-domain-signer/wiki/Overview

Comments

thebuckst0p’s picture

gmania, thanks for writing this up. I'm going to try to integrate it into a site in the next few days. I set up DKIM recently for the domain and sendmail/postfix, but not yet through SES (which we're actually using to send mail).

Ben

thebuckst0p’s picture

In limited testing on my development site so far, this seems to work well.
The note about the required patches is no longer necessary, as they've both been committed.

Thank you for making this work!!

juampynr’s picture

Status: Needs review » Reviewed & tested by the community

Patch applies cleanly and once the extra fields are configured DKIM emails can be sent.

juampynr’s picture

Status: Reviewed & tested by the community » Needs review
StatusFileSize
new9.5 KB

The following include statement produces a PHP error.

+++ amazon_ses.mail.inc Locally Modified (Based On LOCAL)
@@ -100,3 +100,74 @@
+  if (variable_get('amazon_ses_dkim', 0)) {
+    include drupal_get_path('module', 'amazon_ses') . '/lib/class.mailDomainSigner.php';
+

The error is:

PHP Fatal error: include(): Cannot redeclare class maildomainsigner in /var/www/someweb/sites/all/modules/contrib/amazon_ses/amazon_ses.mail.inc on line 152

Attached is a reviewed version of the patch where require_once() is used instead

tkuldeep17’s picture

Status: Needs review » Closed (won't fix)

Sorry, Now my code base does not support for drupal 6.