Three different Drupal Email configuration for different web hosting provider
After successful configuration of the SMTP Authentication Support module according to the previous article here, It seems everythings is OK for a while until I register email account on Gmail and then I find out that It seems my drupal could not send email to any Gmail account!
It looks like my previous configuration does not solve everything, I have to think it through and find out why.
I do some reading about the general Drupal Email configuration and problems that people often runs into, and finally I figure it out like this:
There 're usually three different ways of configuring drupal email functionality:
- The first and easiest way is to configure Drupal to use the operating system 's sendmail.
This kind of configuration is usually done automatically during the installation of drupal, you might not notice it during your drupal installation.
If you could receive mail after the installation of drupal, CONGRADULATIONS! your web hosting server is capable of sending email without any authentication. enjoy it and you could just forget everything I write here.
- Configure Drupal to use your web hosting 's SMTP server.
If you could not receive mail after drupal installation, so you might be in the same situation as I do, which means that you have to configure drupal to use SMTP authentication in order to send mail.
You have to create the mail accout in your web hosting cpanel and configure drupal according to our previous article here.
It works most of the time but I never find out why it doesn't work sending email to Gmail account, might be it 's depend on the web hosting company 's SMTP server 's capability that we might never know!
- Configure drupal to use external SMTP server (e.g. Gmail 's SMTP server)
It seems that this is the final choice for me right now, First We have to register one Gmail account and configure SMTP Authentication just as options 2, We only need to replace the SMTP authentication server informatio using Gmail 's SMTP server that you could find in your Gmail settting.
I solve my problem using the third configuration above. and hopefully I do not have to return to this drupal email problem any more.