$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("[email protected]", '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中,我想發送動態消息到輸入的客戶端。如何使用變量發送消息
郵件順利通過這段代碼發送只是我想$電子郵件發送的AddAddress – Karthik
BRO I GOT解決方案 – Karthik