Help get this topic noticed by sharing it on Twitter Twitter, Facebook Facebook, or email.
Levi Wallach
sad I’m sad

Conneciton refused via php

I'm trying to get a simple email confirmation through sendgrid working. I've been trying the php examples, just cutting and pasting and substituting the email addresses username, password, etc. I've installed Swift 4.1.1 and the SmtpAPIHeaderFile, but I cannot seem to get it to work. I get the following error. If you have any ideas, please let me know:

Warning: stream_socket_client() [function.stream-socket-client]: unable to connect to smtp.sendgrid.net:25 (Connection refused) in /home1/twelvebl/public_html/Sponto/lib/classes/Swift/Transport/StreamBuffer.php on line 271

Fatal error: Uncaught exception 'Swift_TransportException' with message 'Connection could not be established with host smtp.sendgrid.net [Connection refused #111]' in /home1/twelvebl/public_html/Sponto/lib/classes/Swift/Transport/StreamBuffer.php:273 Stack trace: #0 /home1/twelvebl/public_html/Sponto/lib/classes/Swift/Transport/StreamBuffer.php(66): Swift_Transport_StreamBuffer->_establishSocketConnection() #1 /home1/twelvebl/public_html/Sponto/lib/classes/Swift/Transport/AbstractSmtpTransport.php(116): Swift_Transport_StreamBuffer->initialize(Array) #2 /home1/twelvebl/public_html/Sponto/lib/classes/Swift/Mailer.php(79): Swift_Transport_AbstractSmtpTransport->start() #3 /home1/twelvebl/public_html/Sponto/test.php(102): Swift_Mailer->send(Object(Swift_Message), Array) #4 {main} thrown in /home1/twelvebl/public_html/Sponto/lib/classes/Swift/Transport/StreamBuffer.php on line 273
1 person has
this problem
+1
Reply