Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- use ZendMailTransportSmtp as SmtpTransport;
- use ZendMailTransportSmtpOptions;
- use ZendMail;
- use ZendMailMessage;
- $message = new Message();
- $message->addTo('test@hotmail.com')
- ->addFrom('test@host.nl')
- ->setSubject('Greetings and Salutations!')
- ->setBody("Sorry, I'm going to be late today!");
- // Setup SMTP transport using LOGIN authentication
- $transport = new SmtpTransport();
- $options = new SmtpOptions(array(
- 'name' => 'smtphost',
- 'host' => 'smtphost',
- 'port' => 465,
- 'connection_class' => 'login',
- 'connection_config' => array(
- 'username' => 'test@host.nl',
- 'password' => 'password',
- 'ssl' => 'ssl',
- ),
- ));
- $transport->setOptions($options);
- $transport->send($message);
Add Comment
Please, Sign In to add comment