DRUPAL 7: Webform doesn’t send emails via SMTP Gateway out


Drupal 7 Webform could not send emails out via SMTP Gateway


I have this modules enabled in my drupal 7 site:

  • Mail System
  • Mime Mail
  • Smtp Authentication

I have configured Mail system to “format” mails with MIME Mail and “mail” with SMTP Authentication. This configuration is set as site-wide default class.

It works fine for register user email, but when send mail with webforms it doesn’t use that configuration (It sends emails with a local smtp).

How can I make webform take mail system configuration?


The Problem is that by default webform send emails out via mail(). To fix it we have to assign a smtp class to webform. To do so follow step by step quide:

Use three modules:


  1. Try to send out test email via SMTP module.
  2. Try send email via HTML module => under HTML emails right top corner “Send Test”


If both works than there needs to be setup new Class for webform which will communicate with SMTP

Go to Mail System (admin/config/system/mailsystem)

Create new settings

Select “webform module” and click “save”

Under new class select format() = HtmlMailSystem and under mail() select SmtpMailSystem class

Hit “save” again


Now you should be able to see “Webform Module Class” click on it and select HTMLMailSystem_SmtpMailSystem

Once again hit save and that’s it.

drupal 7
SMTP Gateway
webform email