Racuni in predracuni se posiljajo preko drugega smtp racuna (invoice@1ka.si)
This commit is contained in:
parent
dfc8b403b3
commit
fdc950f1e1
@ -22,6 +22,7 @@ class MailAdapter{
|
|||||||
* "alert" - email obvescanje (aktivacija ankete, zakljucena anketa, arhiv ankete...)
|
* "alert" - email obvescanje (aktivacija ankete, zakljucena anketa, arhiv ankete...)
|
||||||
* "admin" - email povezan z administracijo (alerti za admine)
|
* "admin" - email povezan z administracijo (alerti za admine)
|
||||||
* "account" - email povezan z upravljanjem racuna (dodan dostop do anket...)
|
* "account" - email povezan z upravljanjem racuna (dodan dostop do anket...)
|
||||||
|
* "payments" - email povezan s placili paketov (posiljanje racunov, predracunov...)
|
||||||
*/
|
*/
|
||||||
private $type = '';
|
private $type = '';
|
||||||
|
|
||||||
@ -138,7 +139,7 @@ class MailAdapter{
|
|||||||
$this->settings['1ka']['SMTPReplyTo'] = $email_server_settings['secondary_mail']['SMTPReplyTo'];
|
$this->settings['1ka']['SMTPReplyTo'] = $email_server_settings['secondary_mail']['SMTPReplyTo'];
|
||||||
$this->settings['1ka']['SMTPUsername'] = $email_server_settings['secondary_mail']['SMTPUsername'];
|
$this->settings['1ka']['SMTPUsername'] = $email_server_settings['secondary_mail']['SMTPUsername'];
|
||||||
$this->settings['1ka']['SMTPPassword'] = $email_server_settings['secondary_mail']['SMTPPassword'];
|
$this->settings['1ka']['SMTPPassword'] = $email_server_settings['secondary_mail']['SMTPPassword'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Nimamo se nicesar v bazi - nastavimo default nastavitve
|
// Nimamo se nicesar v bazi - nastavimo default nastavitve
|
||||||
else{
|
else{
|
||||||
@ -223,6 +224,15 @@ class MailAdapter{
|
|||||||
|
|
||||||
if(isset($email_server_settings['SMTPSecure']))
|
if(isset($email_server_settings['SMTPSecure']))
|
||||||
$this->settings['smtp']['SMTPSecure'] = $email_server_settings['SMTPSecure'];
|
$this->settings['smtp']['SMTPSecure'] = $email_server_settings['SMTPSecure'];
|
||||||
|
|
||||||
|
// ce posiljamo v povezavi s placili (racuni, predracuni...) - posiljamo preko tretjega maila (invoice@1ka.si)
|
||||||
|
if($this->type == 'payments' && isset($email_server_settings['payments_mail'])){
|
||||||
|
$this->settings['smtp']['SMTPFrom'] = $email_server_settings['payments_mail']['SMTPFrom'];
|
||||||
|
$this->settings['smtp']['SMTPFromNice'] = $email_server_settings['payments_mail']['SMTPFromNice'];
|
||||||
|
$this->settings['smtp']['SMTPReplyTo'] = $email_server_settings['payments_mail']['SMTPReplyTo'];
|
||||||
|
$this->settings['smtp']['SMTPUsername'] = $email_server_settings['payments_mail']['SMTPUsername'];
|
||||||
|
$this->settings['smtp']['SMTPPassword'] = $email_server_settings['payments_mail']['SMTPPassword'];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -751,7 +751,7 @@ class UserNarocila{
|
|||||||
$content .= $signature;
|
$content .= $signature;
|
||||||
|
|
||||||
try{
|
try{
|
||||||
$MA = new MailAdapter();
|
$MA = new MailAdapter($anketa=null, $type='payments');
|
||||||
|
|
||||||
$MA->addRecipients($narocilo_data['email']);
|
$MA->addRecipients($narocilo_data['email']);
|
||||||
|
|
||||||
@ -974,7 +974,7 @@ class UserNarocila{
|
|||||||
$content .= $signature;
|
$content .= $signature;
|
||||||
|
|
||||||
try{
|
try{
|
||||||
$MA = new MailAdapter();
|
$MA = new MailAdapter($anketa=null, $type='payments');
|
||||||
$MA->addRecipients($rowNarocilo['email']);
|
$MA->addRecipients($rowNarocilo['email']);
|
||||||
$resultX = $MA->sendMail($content, $subject);
|
$resultX = $MA->sendMail($content, $subject);
|
||||||
}
|
}
|
||||||
@ -1008,7 +1008,7 @@ class UserNarocila{
|
|||||||
$content .= $signature;
|
$content .= $signature;
|
||||||
|
|
||||||
try{
|
try{
|
||||||
$MA = new MailAdapter();
|
$MA = new MailAdapter($anketa=null, $type='payments');
|
||||||
|
|
||||||
$MA->addRecipients($rowNarocilo['email']);
|
$MA->addRecipients($rowNarocilo['email']);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user