dev-master
9999999-dev https://github.com/jaimevalasek/JVMailA generic module send e-mail for ZF2.
BSD-3-Clause
The Requires
- php >=5.3.3
- zendframework/zendframework 2.*
zf2 send email jaimevalasek
Wallogit.com
2017 © Pedro Peláez
A generic module send e-mail for ZF2.
Create By: Jaime Marcelo Valasek, (*1)
Use this module to send emails from your website., (*2)
Futures video lessons can be developed and published on the website or Youtube channel http://www.zf2.com.br/tutoriais http://www.youtube.com/zf2tutoriais, (*3)
Download this module into your vendor folder., (*4)
After done the above steps, open the file config / application.config.php. And add the module with the name JVMail., (*5)
'JVMail' => array(
'transport' => array(
'smtpOptions' => array(
'host' => 'smtp.domain.com',
'port' => 587,
'connection_class' => 'plain',
'connection_config' => array(
'username' => 'user@domain.com',
'password' => 'password',
'from' => 'anyemail@domain.com'
),
),
'transportSsl' => array(
'use_ssl' => false,
'connection_type' => 'tls' // ssl, tls
),
),
'options' => array(
'type' => 'text/html',
'html_encoding' => \Zend\Mime\Mime::ENCODING_8BIT,
'message_encoding' => 'UTF8'
)
),
application/view/mailtemplates/teste.phhtml, (*6)
You can insert variables into the view template using the setData code sending email below, for example:, (*7)
$mail = new Mail($this->getServiceLocator()->get('servicemanager')); $mail->setData(array('nome' => 'Jaime Marcelo Valasek', 'email' => 'jaime.valasek@gmail.com')), (*8)
html the template, (*9)
Teste de envio de email pelo Modulo JVMail. Nome: nome?> <br> Email: email?>
use JVMail\Service\Mail;
$mail = new Mail($this->getServiceLocator()->get('servicemanager'));
$mail->setSubject('Teste de envio de email pelo modulo JVMail')
->setTo('recipientemail@domain.com')
->setData(array('nome' => 'Jaime Marcelo Valasek', 'email' => 'jaime.valasek@gmail.com'))
->setViewTemplate('teste')
->send();
A generic module send e-mail for ZF2.
BSD-3-Clause
zf2 send email jaimevalasek