Advertisement
Guest User

Untitled

a guest
Feb 16th, 2016
277
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.35 KB | None | 0 0
  1. Uncaught PHP Exception Swift_TransportException: "Expected response code 220 but got code "", with message """ at C:HostingSpacesabcdomain.comwwwrootvendorswiftmailerswiftmailerlibclassesSwiftTransportAbstractSmtpTransport.php line 383 {"exception":"[object] (Swift_TransportException(code: 0): Expected response code 220 but got code "", with message "" at C:\HostingSpaces\abc\domain.com\wwwroot\vendor\swiftmailer\swiftmailer\lib\classes\Swift\Transport\AbstractSmtpTransport.php:383)"} []
  2.  
  3. swiftmailer:
  4. transport: smtp
  5. host: smtp.gmail.com
  6. username: no-reply@googledomain.com
  7. password: password
  8. port: 465
  9. encryption: ssl
  10. spool: { type: memory }
  11.  
  12. public function send_new_order_email($entity) {
  13. try{
  14. $message = $this->getEmailObj("toaddress@gmail.com");
  15. $message->setBody(
  16. $this->renderView(
  17. 'APIBundle:Emails:ops_neworder.html.twig',
  18. array('entity' => $entity)
  19. ),
  20. 'text/html'
  21. )->setSubject('New Order : '.$entity->getId());
  22.  
  23. $this->container->get('mailer')->send($message);
  24. }
  25. catch(Exception $e){}
  26. }
  27.  
  28. private function getEmailObj($email){
  29. $message = Swift_Message::newInstance()
  30. ->setFrom('no-reply@googledomain.com')
  31. ->setTo($email);
  32. return $message;
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement