I am attempting to add SendGrid to a Drupal 7 site. I have been following the offical sendgrid.com documentation for this, and following the instructions for using the smtp authentication support module. (https://sendgrid.com/docs/Integrate/Open_Source_Apps/drupal.html)
After installing and activating the smtp Authentication Support Module using drush (for which I used version 7.x-7.x-2.x-dev because of a bug with the default version), I was able to activate the module without error and follow the instructions in the documentation.
- Going to configuration > System > SMTP Authentication Support
- Turn the module on
- Make sure Email delivery is turned on
- Adding a provier witht eh name sendgrid
- SMTP server: smtp.sendgrid.net
- SMTP port 587
- User encrypted Protocol: No
- username and password for my sendgrid account
- set email from address and email name
- save configuration (which went through without error)
I then filled out a test email address and saved the configuration again.
I got a confirmation message that the settings were stored without error and that the test email had been sent.
I received the test email, but when I checked the headers on the email I received I can see that it has not arrived via SendGrid, but has come directly from my server. I can also see no activity on the SendGrid account at all. I have repeated the test sending system emails linked to user signup and I get the same result, I receive the email but it does not come via SendGrid.
I have also tried using port 465 and SSL as the encryption protocol, but while the the test email reported to have worked, I received no emails at all with these settings. Also as before no activity is logged in SendGrid.
Just to be thorough I tested my SendGrid account using telnet and was able to send an email using the same setting and account username and password used in drupal, including port number. The email was sent without issue, registered in SendGrid activity feed and the received email header references SendGrid.
I have gone as far as I can think of. Can anybody suggest where I might be going wrong?