fix 1 otp
This commit is contained in:
@@ -22,6 +22,8 @@ class Mail_model extends MY_Model{
|
||||
if ( ! is_array( $to ) ) $to = (array) $to;
|
||||
|
||||
foreach ( $to as $receiver ){
|
||||
$this->email->clear();
|
||||
|
||||
$mailParts = explode( '@', $receiver );
|
||||
if (! $mailParts || count($mailParts) < 2)
|
||||
return $result="Er gaat iets fout met e-mail adres ".$receiver;
|
||||
@@ -45,16 +47,22 @@ class Mail_model extends MY_Model{
|
||||
|
||||
private function setmail(){
|
||||
if ( ENVIRONMENT == 'production' ){
|
||||
$config['protocol'] = 'smtp';
|
||||
$config['smtp_host'] = $_ENV['MAILGUN']['HOST'];
|
||||
$config['smtp_port'] = $_ENV['MAILGUN']['SMTP_PORT'];
|
||||
$config['smtp_user'] = $_ENV['MAILGUN']['SMTP_USER'];
|
||||
$config['smtp_pass'] = $_ENV['MAILGUN']['SMTP_PASS'];
|
||||
} else {
|
||||
$config['protocol'] = $_ENV['MAIL']['PROTOCOL'];
|
||||
$config['smtp_host'] = $_ENV['MAIL']['HOST'];
|
||||
$config['smtp_port'] = $_ENV['MAIL']['SMTP_PORT'];
|
||||
$config['smtp_user'] = $_ENV['MAIL']['SMTP_USER'];
|
||||
$config['smtp_pass'] = $_ENV['MAIL']['SMTP_PASS'];
|
||||
}
|
||||
$config['mailtype'] = 'html';
|
||||
$config['charset'] = 'iso-8859-1';
|
||||
$config['crlf'] = "\r\n";
|
||||
$config['newline'] = "\r\n";
|
||||
|
||||
$this->email->initialize( $config );
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
cellpadding="0" cellspacing="15">
|
||||
<tr>
|
||||
<td style="background-color:#ffffff, text-align:center;width:570px">
|
||||
<img src="<?php echo base_url();?>/images/logos/frameworklogo.png"
|
||||
<img src="<?php echo base_url();?>images/logos/frameworklogo.png"
|
||||
style="display: block;width:90px; float:right" />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
Reference in New Issue
Block a user