There are plenty of times when you need to configure your Drupal site to send HTML emails via SMTP server. A common example of an SMTP server is Google apps for business mail. In this blog post, we'll show you how to use HTML Mail module along with SMTP.
2) Go to "Configuration" -> "Mail System". Expand the New Class fieldgroup. Select "HTMLMailSystem" in the format() method dropdown and "SmtpMailSystem" in the mail() method dropdown. Save the form.
3) Saving the previous form should save HTMLMailSystem_SmtpMailSystem.mail.inc in sites/default/files/mailsystem folder. If there is an error, make sure that the files folder is writable by the web server.
4) Go to "Configuration" -> "SMTP Authentication Support". Enter SMTP server information. Note that Google uses port number 465 with SSL. Also enter Authentication information, if any. Click the checkbox to allow HTML in the email. Enter Test Email and save the form.
5) Check your test email. You should have got the following email - Congratulations!! Your SMTP configuration is working.
6) Go to "Configuration" -> "HTML Mail" -> "Send Test". Enter some HTML in the email body. Change Test mail sending class to HTMLMailSystem_SmtpMailSystem and save the form.
7) Check your test email. You should have got the email in HTML format. If yes, then you have successfully configured your Drupal instance to send HTML mails using SMTP.