Tuesday, May 15, 2012

Using a Test SMTP Server For Local Drupal 7 Email Testing

I don't usually require testing email notifications and other email related functions during local site development using Drupal, but there are times when you really need to test how, when and to whom emails are being sent to.

I use Uniform Server for local development, but this should apply to any WAMP install, as it uses just 2 things:
  1. First, the SMTP module
  2. Second, an account in mailtrap.io
For those who are wondering why one should use mailtrap instead of just connecting to hotmail, yahoo or gmail accounts, reasons are:
  • Most email providers will require you to connect via SSL / TLS
  • and will also try to block you believing you are trying to send out spam
Steps
  1. To get SMTP functionality, install the SMTP module
  2. Once you have installed the module, it will require you to input SMTP details. This is where mailtrap.io comes in.
  3. Create an account in mailtrap.io. Once you sign up, you'll receive a confirmation email in your inbox.
    Confirm your email
  4. Go back to mailtrap.io and create an Inbox
  5. Once an Inbox is created, you'll be given SMTP details that you can use
  6. Copy over to the SMTP module configuration page the SMTP details like SMTP Server, Username, Passwords, etc.
  7. Save, and test.

2 comments:

Annie Monie said...

Sending time does matter too. Find your best sending time experimentally. Split your email list into 3-5 smaller groups and send the same email copy to each group at a different time and day. Monitor open rate for each group. You will clearly see which copy and at which time and day performed better. Plan your future email campaigns with regards to your tracking results.




email testing

Drupal Development Company said...

Great details about smtps erver for local drupal email testing.