CC-3110 : Password reset
basic functionality password reset using sendmail
This commit is contained in:
parent
ac50c279f7
commit
52b0e3c5f9
26 changed files with 3024 additions and 23 deletions
36
airtime_mvc/application/models/Email.php
Normal file
36
airtime_mvc/application/models/Email.php
Normal file
|
@ -0,0 +1,36 @@
|
|||
<?php
|
||||
|
||||
class Application_Model_Email {
|
||||
|
||||
/**
|
||||
* Send email
|
||||
*
|
||||
* @param string $subject
|
||||
* @param string $message
|
||||
* @param mixed $tos
|
||||
* @return void
|
||||
*/
|
||||
public static function send($subject, $message, $tos, $from = null)
|
||||
{
|
||||
/*
|
||||
$configMail = array( 'auth' => 'login',
|
||||
'username' => 'user@gmail.com',
|
||||
'password' => 'password',
|
||||
'ssl' => 'ssl',
|
||||
'port' => 465
|
||||
);
|
||||
$mailTransport = new Zend_Mail_Transport_Smtp('smtp.gmail.com',$configMail);
|
||||
*/
|
||||
|
||||
$mail = new Zend_Mail('utf-8');
|
||||
$mail->setSubject($subject);
|
||||
$mail->setBodyText($message);
|
||||
$mail->setFrom(isset($from) ? $from : 'naomiaro@gmail.com');
|
||||
|
||||
foreach ((array) $tos as $to) {
|
||||
$mail->addTo($to);
|
||||
}
|
||||
|
||||
$mail->send();
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue