Mautic Community Forums

Only PHP Mail is working...

I have a copy of Mautic installed on my server - out of the box - no configuration changes… I can’t get any other type of mail configured - Sendgrid, Amazon, Other SMTP…only PHP Mail is working. Is there a setting or something i am missing to be able to use the other services? I checked with my host and they are not restricting ports…



Sendgrid Error:

Connection could not be established with host smtp.sendgrid.net [Connection timed out #110] Log data: ++ Starting Swift_SmtpTransport !! Connection could not be established with host smtp.sendgrid.net [Connection timed out #110] (code: 0)

++ Starting Swift_SmtpTransport !! Connection could not be established with host smtp.sendgrid.net [Connection timed out #110] (code: 0)





Amazon Error:

Connection could not be established with host email-smtp.us-west-2.amazonaws.com [Connection timed out #110] Log data: ++ Starting MauticEmailBundleSwiftmailerTransportAmazonTransport !! Connection could not be established with host email-smtp.us-west-2.amazonaws.com [Connection timed out #110] (code: 0)

++ Starting MauticEmailBundleSwiftmailerTransportAmazonTransport





Thanks,

Jim

I have a copy of Mautic installed on my server - out of the box - no configuration changes… I can’t get any other type of mail configured - Sendgrid, Amazon, Other SMTP…only PHP Mail is working. Is there a setting or something i am missing to be able to use the other services? I checked with my host and they are not restricting ports…

Sendgrid Error:
Connection could not be established with host smtp.sendgrid.net [Connection timed out #110] Log data: ++ Starting Swift_SmtpTransport !! Connection could not be established with host smtp.sendgrid.net [Connection timed out #110] (code: 0)
++ Starting Swift_SmtpTransport !! Connection could not be established with host smtp.sendgrid.net [Connection timed out #110] (code: 0)

Amazon Error:
Connection could not be established with host email-smtp.us-west-2.amazonaws.com [Connection timed out #110] Log data: ++ Starting MauticEmailBundleSwiftmailerTransportAmazonTransport !! Connection could not be established with host email-smtp.us-west-2.amazonaws.com [Connection timed out #110] (code: 0)
++ Starting MauticEmailBundleSwiftmailerTransportAmazonTransport

Thanks,
Jim

Here are the logs when I try to configure Amazon and Sendgrid. Can someone please HELP???

[2016-11-07 05:50:59] mautic.ERROR: PHP Error: Call to undefined method setApiKey - in file /home/bizmds/mautic.bizmds.com/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/EsmtpTransport.php - at line 291 [] []
[2016-11-07 05:51:29] mautic.ERROR: Warning: stream_socket_client(): unable to connect to tcp://smtp.sendgrid.net:587 (Connection timed out) - in file /home/bizmds/mautic.bizmds.com/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/StreamBuffer.php - at line 267 [] []
[2016-11-07 05:53:04] mautic.ERROR: Deprecation: The alias option of the form.type_extension tag of service “fos_rest.form.extension.csrf_disable” is deprecated since version 2.8 and will be removed in 3.0. Use the extended_type option instead. - in file /home/bizmds/mautic.bizmds.com/vendor/symfony/framework-bundle/DependencyInjection/Compiler/FormPass.php - at line 67 [] []
[2016-11-07 05:53:29] mautic.ERROR: PHP Error: Call to undefined method setApiKey - in file /home/bizmds/mautic.bizmds.com/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/EsmtpTransport.php - at line 291 [] []
[2016-11-07 05:53:59] mautic.ERROR: Warning: stream_socket_client(): unable to connect to tcp://smtp.sendgrid.net:587 (Connection timed out) - in file /home/bizmds/mautic.bizmds.com/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/StreamBuffer.php - at line 267 [] []
[2016-11-07 05:56:00] mautic.ERROR: PHP Error: Call to undefined method setApiKey - in file /home/bizmds/mautic.bizmds.com/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/EsmtpTransport.php - at line 291 [] []
[2016-11-07 05:56:30] mautic.ERROR: Warning: stream_socket_client(): unable to connect to tcp://smtp.sendgrid.net:587 (Connection timed out) - in file /home/bizmds/mautic.bizmds.com/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/StreamBuffer.php - at line 267 [] []
[2016-11-07 05:58:53] mautic.ERROR: Deprecation: The alias option of the form.type_extension tag of service “fos_rest.form.extension.csrf_disable” is deprecated since version 2.8 and will be removed in 3.0. Use the extended_type option instead. - in file /home/bizmds/mautic.bizmds.com/vendor/symfony/framework-bundle/DependencyInjection/Compiler/FormPass.php - at line 67 [] []
[2016-11-07 05:58:58] mautic.ERROR: PHP Error: Call to undefined method setApiKey - in file /home/bizmds/mautic.bizmds.com/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/EsmtpTransport.php - at line 291 [] []
[2016-11-07 05:59:28] mautic.ERROR: Warning: stream_socket_client(): unable to connect to tcp://email-smtp.us-west-2.amazonaws.com:587 (Connection timed out) - in file /home/bizmds/mautic.bizmds.com/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/StreamBuffer.php - at line 267 [] []

I have the same error do you solve it?

Can you ping those mailservers from the shell of your VPS?
Does the DNS resolve them to proper IPs?
Can you telnet to them from the shell of the VPS (to appropriate ports, of course)?

I have the same problem with 2.6.0 and telnet to the mailserver is working properly.

Any update?

First make sure your webhost firewall does not block the smtp port you are using. Then ensure the setting from your smtp server are configure correctly.

I using Elasticemail smtp, so far so good.

There is a fix for this issue here: https://github.com/mautic/mautic/pull/3440/files - give it a whirl :slight_smile:

Ruth

I switched hosting providers and it worked fine after that…strange.