Mautic Community Forums

Sendgrid connection error

Hi Guys,



I love your platform. Great potential!



Just wanted to ask you if there is any other way to connect to sendgrid, maybe api, because I get this error when connecting:



Connection could not be established with host smtp.sendgrid.net [Connection timed out #110] Log data: ++ Starting MauticEmailBundleSwiftmailerTransportSendgridTransport !! Connection could not be established with host smtp.sendgrid.net [Connection timed out #110]

++ Starting MauticEmailBundleSwiftmailerTransportSendgridTransport !! Connection could not be established with host smtp.sendgrid.net [Connection timed out #110]



Could you please help me?



Thanks!

Razvan

Hi Guys,

I love your platform. Great potential!

Just wanted to ask you if there is any other way to connect to sendgrid, maybe api, because I get this error when connecting:

Connection could not be established with host smtp.sendgrid.net [Connection timed out #110] Log data: ++ Starting MauticEmailBundleSwiftmailerTransportSendgridTransport !! Connection could not be established with host smtp.sendgrid.net [Connection timed out #110]
++ Starting MauticEmailBundleSwiftmailerTransportSendgridTransport !! Connection could not be established with host smtp.sendgrid.net [Connection timed out #110]

Could you please help me?

Thanks!
Razvan

What did you choose in the Email configuration as “Service to send emails through”? Sendgrid or Other SMTP? Could you choose the option you haven’t tried? Make sure the SMTP encryption type and port is correct.

For those who have problem with SendGrid and API.

1 - “Service to send emails through” -> Other SMTP Server
2 - SMTP Host -> smtp.sendgrid.net
3 - SMTP Port -> 465
4 - SMTP encryption type -> SSL
5 - SMTP authentication mode -> Login
6 - Username for the selected mail service -> Put your sendgrid username or email
7 - Password for the selected mail service -> Your Sendgrid Password

Done.

Tested with Shared GoDaddy, OVH VPS and Shared Hostgator just now.

Thanks escopecz & tiagorodrigues,

It didn’t work with “Sendgrid”, but works great with “Other SMTP” and the details above.

Thanks again guys!
Razvan

=D

I tried same settings as here but still got same error message.

Any other suggestions? I am at eleven2 host.

Regards
Kimmo

thanks @tiagorodrigues

Hi Guys,

Getting the same error even after following the instructions from above. Does our site have to be HTTPS for this to work?

Got the same problem with all the providers on the dropdown connections…
NOTE: I’m using the MAUTIC PRO on their web or server… not the free download (yet)… being an outside server where they got it, on the e-mail config section there is a warning on PORTS = Due to our platform hosting restrictions, we are not able to support outgoing mail on ports 25, 465 or 587. Compatible SMTP servers will need to support a non-standard mail port such as 2525 or 2587.

but any way I tried the connection above and I get this error…:

Connection could not be established with host http://smtp.sendgrid.net [php_network_getaddresses: getaddrinfo failed: Name or service not known #0] Log data: ++ Starting Swift_SmtpTransport !! Connection could not be established with host http://smtp.sendgrid.net [php_network_getaddresses: getaddrinfo failed: Name or service not known #0] (code: 0)
++ Starting Swift_SmtpTransport !! Connection could not be established with host http://smtp.sendgrid.net [php_network_getaddresses: getaddrinfo failed: Name or service not known #0] (code: 0)

and using their recommended ports 2525 2587 – Nothing…

The ONLY service which connected with SUCCESS was Amazon SES – but when I went to send a TEST mail… it stayed there doing nothing and finally got BLOCKED error on my own email addresses I was using to the test. !!!

What’s NEXT ??? – I GOT 4 DAYS TRYING TO GET THIS GOING… H E L P !!! Luis

o Tiago da para ligar a gente ?

Hi @BT4,

Due to the requirements of your hosting provider, I presume that you’re using Other SMTP Server from the ‘Service to send email through’ dropdown?

From the error message which you posted, it looks like you might possibly have the incorrect information entered in the SMTP host field.

Ensure that the only text in that field is: smtp.sendgrid.net.
It should not read: http://smtp.sendgrid.net

Try making that change and test the connection afterwards. When you specify ‘http’ you’re telling the software to use hypertext transfer protocol to send the information like a web page, i.e. on port 80. smtp (simple mail transfer protocol) is a different method by which information is sent across a network. That could be the cause of the problem.

Please post back if that doesn’t resolve your issue.

You save my day @tiagorodrigues

I am with this error here too.

Verify if your provider has the Outgoing port (587) open

Hi there,

New with Mautic, trying to connect Sendgrid and after reading tons of docs I found a solution.


1.- open WHM
2.- type “firewall” in the text box
3.- select smtp settings from dropdown menu: http://prntscr.com/cu7vwe
4.- Set SMTP_BLOCK = OFF (0) : http://prntscr.com/cu7u05
5.- at the bottom of the page, click “Change” : http://prntscr.com/cu7wo8


ATTENTION: I’m not expert and I’m not sure about security issues regarding spam.
You can read this info to know more: http://blog.serverbuddies.com/csf-smtp_block-option/

As my VPS has only my accounts I think this will not be a problem…

After changing the config above, in mautic just select sendgrid and VOILA!
http://prntscr.com/cu7zd1

I hope it helps!

Guys! I had the same errors… now I found out that I had not configured it right.

I had been using my sendgrid username and password! That’s wrong.

First login to your sendgrid account, click on your username in the upper left corner, then -> Setup Guide.
Click on »Integrate using our Web API or SMTP relay (Easily send API-driven email from your application.)«, then »SMTP Relay«.

And follow the procedure. (2 steps: Enter a username to create an apikey and click ‘create apikey’, then copy the key that got generated.

Go to your Mautic Email config and enter username and password for Sendgrid (not other smtp)
username = apikey (yes: apikey)
key = key that you just copied.

Click test connection and send test mail. Should work!

Just wanted to say thanks to anarchist912. This solution worked for me.