This topic is locked
[SOLVED]

 Mass Email

11/20/2013 12:21:20 AM
PHPRunner General questions
S
stanbar1 author

php 7.0

Hi

i got code from manual

global $dal;

//select emails from Users table

$tblUsers = $dal->Table("flusers");

$rs = $tblUsers->QueryAll();

while ($data = db_fetch_array($rs))

{

$email=$data["admin@kingsdaycareacademy.com"];

$from="admin@kingsdaycareacademy.com";

$msg="Check events on this season";

$subject="Monthly newsletter";

$ret=runner_mail(array('to' => $email, 'subject' => $subject,

'body' => $msg, 'from'=>$from));

if(!$ret["mailed"])

echo $ret["message"]."
";

}

in event:after record edded

i got message after Save
"You must provide at least one recipient email address.
You must provide at least one recipient email address.
You must provide at least one recipient email address."

Sergey Kornilov admin 11/20/2013

Well, you do need to provide at least one recipient address.
The following line of code simply doesn't make any sense:

$email=$data["admin@kingsdaycareacademy.com"]
You need to substitute admin@kingsdaycareacademy.com with name of the field that stores email addresses.

S
stanbar1 author 11/20/2013



Well, you do need to provide at least one recipient address.
The following line of code simply doesn't make any sense:

$email=$data["admin@kingsdaycareacademy.com"]
You need to substitute admin@kingsdaycareacademy.com with name of the field that stores email addresses.



i'm sorry i miss something Field name "Email"
$email=$data "Email:"["yelena@kingsdaycareacademy.com"];

Sergey Kornilov admin 11/20/2013
$email=$data["Email"];


Note: Field names are case-sensitive.

S
stanbar1 author 11/20/2013


$email=$data["Email"];


Note: Field names are case-sensitive.



THANK YOU