cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
New

Email Issue in Godaddy Server using swiftmailer

Our email is hosted at Zoho, When trying to implement a contact us form using Swiftmailer, we are getting the error below. We have used the same code in a different server and it worked.

 

<br />
<b>Fatal error</b>: Uncaught exception 'Swift_TransportException' with message 'Connection could not be established with host smtp.zoho.eu [Connection refused #111]' in /home/winsoc/public_html/test/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/StreamBuffer.php:268
Stack trace:
#0 /home/winsoc/public_html/test/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/StreamBuffer.php(62): Swift_Transport_StreamBuffer-&gt;_establishSocketConnection()
#1 /home/winsoc/public_html/test/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php(113): Swift_Transport_StreamBuffer-&gt;initialize(Array)
#2 /home/winsoc/public_html/test/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mailer.php(79): Swift_Transport_AbstractSmtpTransport-&gt;start()
#3 /home/winsoc/public_html/test/mail/contact_me.php(66): Swift_Mailer-&gt;send(Object(Swift_Message))
#4 {main}
thrown in <b>/home/winsoc/public_html/test/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/StreamBuffer.php</b> on line <b>268</b><br />

3 REPLIES 3
Anonymous
Not applicable

Re: Email Issue in Godaddy Server using swiftmailer

Hi @rhewa 👋 

what is your domain name?

New

Re: Email Issue in Godaddy Server using swiftmailer

winsocially.com

New

Re: Email Issue in Godaddy Server using swiftmailer

my domain name: amida.tv

I have the same problem. On my local machine the code below works fine
while when running it on my web host I get the error message below.

 

Swift_TransportException in StreamBuffer.php line 268:Connection could not be established with host smtp.mail.yahoo.com [Connection refused #111]

  1. in StreamBuffer.php line 268
  2. at Swift_Transport_StreamBuffer->_establishSocketConnection() in StreamBuffer.php line 62
  3. at Swift_Transport_StreamBuffer->initialize(array('protocol' => 'ssl', 'host' => 'smtp.mail.yahoo.com', 'port' => '465', 'timeout' => '30', 'blocking' => '1', 'tls' => false, 'type' => '1', 'stream_context_options' => array())) in AbstractSmtpTransport.php line 113
  4. at Swift_Transport_AbstractSmtpTransport->start() in Mailer.php line 79
  5. at Swift_Mailer->send(object(Swift_Message), array()) in Mailer.php line 385
  6. at Mailer->sendSwiftMessage(object(Swift_Message)) in Mailer.php line 171
  7. at Mailer->send('layouts.frontend.partials.emails.blanks', array('fullname' => 'amida test', 'mail' => 'admin@gmail.com', 'messages' => 'test mail', 'message' => object(Message)), object(Closure)) in Facade.php line 221
  8. at Facade::__callStatic('send', array('layouts.frontend.partials.emails.blanks', array('fullname' => 'amida test', 'mail' => 'admin@gmail.com', 'messages' => 'test mail'), object(Closure))) in ContactController.php line 27
  9. at ContactController->post_contact(object(Request))
  10. at call_user_func_array(array(object(ContactController), 'post_contact'), array(object(Request))) in Controller.php line 80
  11. at Controller->callAction('post_contact', array(object(Request))) in ControllerDispatcher.php line 146
  12. at ControllerDispatcher->call(object(ContactController), object(Route), 'post_contact') in ControllerDispatcher.php line 94
  13. at ControllerDispatcher->Illuminate\Routing\{closure}(object(Request))
  14. at call_user_func(object(Closure), object(Request)) in Pipeline.php line 52
  15. at Pipeline->Illuminate\Routing\{closure}(object(Request))
  16. at call_user_func(object(Closure), object(Request)) in Pipeline.php line 102
  17. at Pipeline->then(object(Closure)) in ControllerDispatcher.php line 96
  18. at ControllerDispatcher->callWithinStack(object(ContactController), object(Route), object(Request), 'post_contact') in ControllerDispatcher.php line 54
  19. at ControllerDispatcher->dispatch(object(Route), object(Request), 'App\Http\Controllers\ContactController', 'post_contact') in Route.php line 174
  20. at Route->runController(object(Request)) in Route.php line 140
  21. at Route->run(object(Request)) in Router.php line 724
  22. at Router->Illuminate\Routing\{closure}(object(Request))
  23. at call_user_func(object(Closure), object(Request)) in Pipeline.php line 52
  24. at Pipeline->Illuminate\Routing\{closure}(object(Request)) in ShareErrorsFromSession.php line 49
  25. at ShareErrorsFromSession->handle(object(Request), object(Closure))
  26. at call_user_func_array(array(object(ShareErrorsFromSession), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 136
  27. at Pipeline->Illuminate\Pipeline\{closure}(object(Request))
  28. at call_user_func(object(Closure), object(Request)) in Pipeline.php line 32
  29. at Pipeline->Illuminate\Routing\{closure}(object(Request)) in StartSession.php line 64
  30. at StartSession->handle(object(Request), object(Closure))
  31. at call_user_func_array(array(object(StartSession), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 136
  32. at Pipeline->Illuminate\Pipeline\{closure}(object(Request))
  33. at call_user_func(object(Closure), object(Request)) in Pipeline.php line 32
  34. at Pipeline->Illuminate\Routing\{closure}(object(Request)) in AddQueuedCookiesToResponse.php line 37
  35. at AddQueuedCookiesToResponse->handle(object(Request), object(Closure))
  36. at call_user_func_array(array(object(AddQueuedCookiesToResponse), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 136
  37. at Pipeline->Illuminate\Pipeline\{closure}(object(Request))
  38. at call_user_func(object(Closure), object(Request)) in Pipeline.php line 32
  39. at Pipeline->Illuminate\Routing\{closure}(object(Request)) in EncryptCookies.php line 59
  40. at EncryptCookies->handle(object(Request), object(Closure))
  41. at call_user_func_array(array(object(EncryptCookies), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 136
  42. at Pipeline->Illuminate\Pipeline\{closure}(object(Request))
  43. at call_user_func(object(Closure), object(Request)) in Pipeline.php line 32
  44. at Pipeline->Illuminate\Routing\{closure}(object(Request))
  45. at call_user_func(object(Closure), object(Request)) in Pipeline.php line 102
  46. at Pipeline->then(object(Closure)) in Router.php line 726
  47. at Router->runRouteWithinStack(object(Route), object(Request)) in Router.php line 699
  48. at Router->dispatchToRoute(object(Request)) in Router.php line 675
  49. at Router->dispatch(object(Request)) in Kernel.php line 246
  50. at Kernel->Illuminate\Foundation\Http\{closure}(object(Request))
  51. at call_user_func(object(Closure), object(Request)) in Pipeline.php line 52
  52. at Pipeline->Illuminate\Routing\{closure}(object(Request)) in CheckForMaintenanceMode.php line 44
  53. at CheckForMaintenanceMode->handle(object(Request), object(Closure))
  54. at call_user_func_array(array(object(CheckForMaintenanceMode), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 136
  55. at Pipeline->Illuminate\Pipeline\{closure}(object(Request))
  56. at call_user_func(object(Closure), object(Request)) in Pipeline.php line 32
  57. at Pipeline->Illuminate\Routing\{closure}(object(Request))
  58. at call_user_func(object(Closure), object(Request)) in Pipeline.php line 102
  59. at Pipeline->then(object(Closure)) in Kernel.php line 132
  60. at Kernel->sendRequestThroughRouter(object(Request)) in Kernel.php line 99
  61. at Kernel->handle(object(Request)) in index.php line 53