php - Class MailerPHP strange behaviour (looping array of address) -



php - Class MailerPHP strange behaviour (looping array of address) -

i using class mailerphp send emails on website. working perfect have work there unusual stuff can not figure out why this.

1. have array of address sending emails, array this:

$email = new sendemail(); $_admin_email = array('first_email', 'second_email', 'third_email'); $email->setemail($_admin_email);

the problem when sending emails, sending 3 emails: 1. sending first_email 2. after sending first_email , second_email 3. , @ end sending first_email, second_email , third_email

i send 1 3 , not send 3 times email, not understand why sending this.

2. , sec problem using google business relationship connect smtp send emails, , not know why in field of email showing gmail address connect smtp, setup address show there , showing + gmail account:

i have configuration , didn't set anywhere else gmail business relationship smtp connection:

public $username = 'my_gmail_account_to connect_to_smtp'; public $password = 'my_gmail_account_password';

the result of when emails first email setup show reply + my_gmail_account_to connect_to_smtp, need take out my_gmail_account_to connect_to_smtp email user not see it.

if need info code utilize please allow me know put.

all code send email:

$_admin_email = array("first_email", "second_email", "third_email"); $email2 = new sendemail(); $email2->setsubject("subject"); $email2->setusername($_user['name']); $email2->setmt4account($_user['login']); $email2->setdate($_user['date']); $email2->setamount($_user['amount']); $email2->setcurrency($_user['currency']); $email2->setregisteredbankaccount($_user['type']); $email2->setbankaccountname($_user['card']); $email2->settemplate('template_for_the_email'); $email2->setemail($_admin_email); echo $email2->send();

try this:

$_admin_email = array('first_email', 'second_email', 'third_email'); foreach($_admin_email $ademail) { $email->setemail($ademail); }

php email

Comments

Popular posts from this blog

Delphi change the assembly code of a running process -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -

C++ 11 "class" keyword -