Zend SMTP Integration Guide

Guide to integrate Mailazy with your Zend application


You need to complete these given prerequisites, you can skip the step if you have already completed.

  1. Sign up for a Mailazy account.
  2. Complete Domain Authentication.
  3. Generate the Mailazy Access Key

Integrate Mailazy with Zend

You can directly integrate Zend's mail module with Mailazy to use our SMTP servers for outgoing messages.

require_once '$HOME/mailazy/Zend/library/Zend/Mail.php';
require_once '/$HOME/mailazy/Zend/library/Zend/Mail/Transport/Smtp.php';

$config  =  array('ssl' => 'tls',
'port' => '587',
'auth' => 'login',
'username' => 'mailazy_apikey',
'api_key' => 'mailazy_secret');
$transport  =  new Zend_Mail_Transport_Smtp('smtp.mailazy.com', $config);

$mail  =  new Zend_Mail();
$mail->setFrom('sendeexampexample@example.com', 'Some Sender');
$mail->addTo('email@example.com','Some Recipient');
$mail->setSubject('Test Subject');
$mail->setBodyText('This is the text of the mail using Zend.');