Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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)"} []
- swiftmailer:
- transport: smtp
- host: smtp.gmail.com
- username: no-reply@googledomain.com
- password: password
- port: 465
- encryption: ssl
- spool: { type: memory }
- public function send_new_order_email($entity) {
- try{
- $message = $this->getEmailObj("toaddress@gmail.com");
- $message->setBody(
- $this->renderView(
- 'APIBundle:Emails:ops_neworder.html.twig',
- array('entity' => $entity)
- ),
- 'text/html'
- )->setSubject('New Order : '.$entity->getId());
- $this->container->get('mailer')->send($message);
- }
- catch(Exception $e){}
- }
- private function getEmailObj($email){
- $message = Swift_Message::newInstance()
- ->setFrom('no-reply@googledomain.com')
- ->setTo($email);
- return $message;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement