Guest User

Untitled

a guest
Nov 30th, 2017
345
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.45 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. password: password
  7. port: 465
  8. encryption: ssl
  9. spool: { type: memory }
  10.  
  11. public function send_new_order_email($entity) {
  12. try{
  13. $message = $this->getEmailObj("[email protected]");
  14. $message->setBody(
  15. $this->renderView(
  16. 'APIBundle:Emails:ops_neworder.html.twig',
  17. array('entity' => $entity)
  18. ),
  19. 'text/html'
  20. )->setSubject('New Order : '.$entity->getId());
  21.  
  22. $this->container->get('mailer')->send($message);
  23. }
  24. catch(Exception $e){}
  25. }
  26.  
  27. private function getEmailObj($email){
  28. $message = Swift_Message::newInstance()
  29. ->setFrom('[email protected]')
  30. ->setTo($email);
  31. return $message;
  32. }
  33.  
  34. swiftmailer:
  35. transport: gmail
  36. username: your_gmail_username
  37. password: your_gmail_password
Add Comment
Please, Sign In to add comment