forked from verdnatura/hedera-web
Errores mail solucionados
This commit is contained in:
parent
6eda62a5dc
commit
394e08fd02
|
@ -1,4 +1,4 @@
|
|||
hedera-web (1.394-deb8) stable; urgency=low
|
||||
hedera-web (1.397-deb8) stable; urgency=low
|
||||
|
||||
* Initial Release.
|
||||
|
||||
|
|
|
@ -3,5 +3,6 @@
|
|||
cd /usr/share/hedera-web && npm install --production
|
||||
a2enconf hedera-web
|
||||
service apache2 reload
|
||||
service php5-fpm restart
|
||||
service cron restart
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@ class Mail extends Vn\Lib\Method
|
|||
$status = 'OK';
|
||||
|
||||
try {
|
||||
//if (!preg_match ('/^[\w\._%-]+@[\w\.-]+\.[A-Za-z]{2,4}$/', $row['to']))
|
||||
//if (!preg_match ('/^[\w\._%-]+@[\w\.-]+\.[A-Za-z]{2,4}$/', $mailTo))
|
||||
// throw new Exception ('Destination mail has invalid sintax');
|
||||
|
||||
$mail = new PHPMailer ();
|
||||
|
@ -50,14 +50,12 @@ class Mail extends Vn\Lib\Method
|
|||
$mail->setFrom ($conf['sender'], $conf['sender_name']);
|
||||
$mail->AddReplyTo ($row['reply_to'], $conf['sender_name']);
|
||||
|
||||
if (strpos ($row['to'], ','))
|
||||
$mailList = explode (',', $row['to']);
|
||||
else
|
||||
$mailList = explode (';', $row['to']);
|
||||
$mailList = explode (',', $row['to']);
|
||||
|
||||
foreach ($mailList as $mailTo)
|
||||
$mail->AddAddress ($mailTo);
|
||||
foreach ($mailList as $to)
|
||||
$mail->AddAddress ($to);
|
||||
|
||||
$mail->IsHTML (TRUE);
|
||||
$mail->Subject = $row['subject'];
|
||||
$mail->Body = ' '. $row['text'];
|
||||
$mail->CharSet = 'UTF-8';
|
||||
|
|
|
@ -35,7 +35,11 @@ class Mailer
|
|||
}
|
||||
|
||||
$mail->setFrom ($conf['sender'], $conf['sender_name']);
|
||||
$mail->AddAddress ($mailTo);
|
||||
|
||||
$mailList = explode (',', $mailTo);
|
||||
|
||||
foreach ($mailList as $to)
|
||||
$mail->AddAddress ($to);
|
||||
|
||||
$mail->IsHTML (TRUE);
|
||||
$mail->Subject = $subject;
|
||||
|
|
Loading…
Reference in New Issue