这是我的代码
$secondEmail="eamail2@gmail.com";
发送邮件两封电子邮件
$to = $email,$secondEmail;
$email_from = 'website.com';
$email_subject = "Register Details: " ;
$email_body = "Sender Name: $from"
答案 0 :(得分:0)
您可以添加多封电子邮件With comma separated
值
$to = "myfirstemail@xyz.com, mysecondemail@xyz.com";
$email_from = 'website.com';
$email_subject = "Register Details: " ;
$email_body = "Sender Name: $from" ;
对于变量,只需将其放入""
;
$email1="eamil1@gmail.com";
$email2="email2@gmail.com";
$to = "$email1 , $email2";
答案 1 :(得分:0)
您可以将邮件ID用作字符串,
$to = $email.",".$secondEmail;
$email_from = 'website.com';
$email_subject = "Register Details: " ;
$email_body = "Sender Name: $from"