How to integrate Aritic Mail with Zend?

  Integrate Frameworks with Aritic Mail

Zend

You can directly integrate Zend’s mail module with Aritic Mail to use our SMTP servers for outgoing messages.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<?php
require_once '$HOME/ariticmailid/Zend/library/Zend/Mail.php';
require_once '/$HOME/ariticmailid/Zend/library/Zend/Mail/Transport/Smtp.php';

$smtpServer = 'mail.ariticmail.com';
$username =
$password =

$config = array('ssl' => 'tls',
'port' => '25',
'auth' => 'login',
'username' => $username,
'password' => $password);

$transport = new Zend_Mail_Transport_Smtp($smtpServer, $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.');

$mail->send($transport);
?>

If you prefer a modular installation, then check out Jurian Sluiman’s SlmMail project at GitHub.

LEAVE A COMMENT