Configure SendGrid SMTP in Google Cloud

1,716 views
Skip to first unread message

Stephanie

unread,
Jul 24, 2015, 10:40:41 AM7/24/15
to ResourceSpace
Hi, I am having problem getting email to work. When I try to email a resource it tells me it is sent, but I never receive the email. My install details are: Bitnami's one click install in the Google Cloud. I am trying to enter my credentials and smtp settings for our SendGrid account in the config.php file. Here is what I have added, is there anything else I need to update in this / other files?

# Use an external SMTP server for outgoing emails (e.g. Gmail).
$use_smtp=true;
# SMTP settings:
$smtp_secure='ssl'; # , 'tls' or 'ssl'. For Gmail, 'tls' or 'ssl' is required.
$smtp_host='smtp.sendgrid.net'; # Hostname, e.g. 'smtp.gmail.com'.
$smtp_port=2525; # Port number, e.g. 465 for Gmail using SSL.
$smtp_auth=true; # Send credentials to SMTP server (false to use anonymous access)
$smtp_username='IEnteredMyUsername'; # Username (full email address).
$smtp_password='IEnteredMyPWD'; # Password.
#enable php mailer - this is also to allow HTML format emails.
$use_phpmailer=false;

Eric Bacus

unread,
Sep 1, 2015, 3:42:55 PM9/1/15
to ResourceSpace
I'm having the exact same issue. Did you ever figure this out?

Stephanie

unread,
Sep 2, 2015, 11:35:45 AM9/2/15
to ResourceSpace
Hi Eric,

I have not figured this out :( In the mean time I have disabled the 'share url'. I would love to get this working!?!

Eric Bacus

unread,
Sep 2, 2015, 11:48:32 AM9/2/15
to ResourceSpace
I got this working!  It turned out, I needed to install postfix.

Follow these specific instructions...

Then use the following settings in your config.php file.

# Use an external SMTP server for outgoing emails (e.g. Gmail).
# Requires $use_phpmailer.
$use_smtp=true;
# SMTP settings:
$smtp_secure='tls'; # '', 'tls' or 'ssl'. For Gmail, 'tls' or 'ssl' is required.
$smtp_host='smtp.sendgrid.net'; # Hostname, e.g. 'smtp.gmail.com'.
$smtp_port=2525; # Port number, e.g. 465 for Gmail using SSL.
$smtp_auth=true; # Send credentials to SMTP server (false to use anonymous access)
$smtp_username='YOUR_SENDGRID_USER_NAME'; # Username (full email address).
$smtp_password='YOUR_SENDGRID_PASSWORD'; # Password.
$use_phpmailer=true;

Finally in your cloud developer console, make a new firewall rule opening port 2525.

As far as I know, that should work. It was the product of quite a bit of trial and error, so I won't be much help troubleshooting, so hopefully that takes care of it.

Stephanie

unread,
Sep 2, 2015, 12:27:38 PM9/2/15
to ResourceSpace
awesome, I will give this a try. 

Question: for your "$smtp_username" did you enter the full email address? And when you created your google firewall rule for the source/ip rule did you use: 0.0.0.0/0 and for the allowed protocol and ports: tcp:2525

Thanks again!

Eric Bacus

unread,
Sep 2, 2015, 12:42:23 PM9/2/15
to ResourceSpace
I simply used my sendgrid username, not the email address.

and that port configuration looks correct to me!  good luck!
Reply all
Reply to author
Forward
0 new messages