$mail = new PHPMailer(true);
$mail->IsSMTP();
$mail->SMTPDebug = 0;
$mail->SMTPAuth = true;
$mail->SMTPSecure = 'ssl';
// $mail->Host = "smtp.gmail.com";
$mail->Host = "mail.infysky.com";
$port = $mail->Port = 465;
//echo "<br />";
$mail->IsHTML(false);
$name = "'" . $params["txtName"] . "'";
$email = "'" . $params["txtEmailID"] . "'";
$department = "'" . $params["selDepartment"] . "'";
$designation = "'" . $params["selDesignation"] . "'";
$leave = "'" . $params["selLeave"] . "'";
$dateFrom = "'" . $params["txtDate1"] . "'";
$dateTo = "'" . $params["txtDate2"] . "'";
$reason = "'" . $params["txtReason"] . "'";
$mail->SetFrom("karthik.hansi@infysky.com", 'infy SKY');
$mail->Subject = "90%";
$mail->Body = "Message for leave apply \n NAME: $name;\n E-MAIL
$email;\n DEPARTMENT: $department; \n DESIGNATION: $designation;\n LEAVE
TYPE: $leave;\n DATE FROM: $dateFrom;\n DATE TO: $dateTo;\n REASON:
$reason; ";
$mail->AddAddress(); //To Address
$mail->Send();
如何从PHP Mailer中的AddAddress中的变量发送消息。 在AddAddress中,我想向输入的客户端发送动态消息。