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.

Monday, May 07, 2012

Apache crashes when running Drupal on Uniserver 7.1.5 ( Orion )

While installing additional modules to Drupal 6 and 7 on UniServer 7.1.5 ( a portable server on Windows ), I have encountered multiple times Apache having problems starting. Looking at the Apache logs, there are entries for PHP Fatal error: Allowed memory size of 33554432 bytes exhausted.

This can quickly be resolved by increasing PHP Memory Limit to something higher than 32MB.

  1. From root of UniServer, go to usr > local > php and open in a text editor the php.ini file.
  2. Look for memory_limit and increase from 32M to 64M or 128M.

  3. Restart Apache service.