Notes on using GMail to send mailPosted: March 13, 2009
A couple of observations about using GMail to send mail messages automatically.
Background: I’m updating the automatic licensing system that supports our InfoPatterns products for Groove. When a user gets a license from the commerce system, they need to get an activation code that ties that license to that user. They fill in a form in the application and that talks to a web service. The web service sends them an email with an activation code in it. We use Google Mail for the Infopatterns email accounts and have the infopatterns.com domain as the primary domain with infopatterns.net as a domain alias.
1: When debugging, make sure you use a live email address to send to. I was sending mail to ‘email@example.com’ when that user didn’t exist. You’ll get problems if you do this, obviously, but you won’t be able to tell if they are problems connecting, or problems sending.
2: If you’ve got more than one domain configured like we do, make sure your sender email address is for the primary domain. You won’t be able to log into the server otherwise.