dev-master
9999999-dev https://github.com/arvind2110/ZF2MailZF2-Mail is very simple ZF2 module for handling ZF2 mails.
The Requires
- php >=5.3
by Arvind Singh
mail zf2 zf2 mail
ZF2-Mail is very simple ZF2 module for handling ZF2 mails.
ZF2-Mail is a simple ZF2 module to implement and manage mail functionality in ZF2 applications., (*1)
SMTP settings : module.config.php, (*2)
return array( "EMAIL" => array( "SMTP_SENDER_TYPE" => "user", "SMTP_NAME" => "localhost", "SMTP_HOST" => "localhost", "SMTP_PORT" => "25", "SMTP_CONNECTION_CLASS" => "plain", "SMTP_USERNAME" => "", "SMTP_PASSWORD" => "", "SMTP_SSL" => "", "BODY" => "Custom default message", "FROM" => "noreply@example.com", "TO" => "yoremail@example.com", "MAIL_FROM_NICK_NAME" => "Custom Name", "SUBJECT" => "Custom Subject", "FROM_NICK_NAME" => "Cutom From", "EMAIL_TEMPLATE_PATH" => __DIR__ . "/../view/emails/templates/", "USE_SMTP" => FALSE ) );
Sending Mails, (*3)
$mail = $this->getServiceLocator()->get('ZF2Mail'); $mailOptions = array( 'mailTo' => 'arvind.singh.2110@gmail.com', 'mailFrom' => 'example@example.com', 'mailSubject' => 'My Custom Subject', 'mailBody' => 'My custom message', 'templateFile' => 'custom-message', 'params' => array('name' => 'Arvind Singh') ); $mail->sendMail($mailOptions);
You can pass other parameters as per your requirement., (*4)
ZF2-Mail is very simple ZF2 module for handling ZF2 mails.
mail zf2 zf2 mail