我正在使用 PHPMailer 设置电子邮件配置,并且在我的办公室中使用本地电子邮件可以正常工作,但是由于我想使用 Sendinblue 作为电子邮件 API,所以我只是卡住了,它没有用。
我试图找到一些修复它的建议,但卡住了。有没有人试图用 PHPMailer 弄清楚我在寻找关于 Sendinblue 的内容?
在后台使用 PHPMailer 库,我通常使用此代码来运行我的程序
function send_mail2($from,$from_name,$to,$to_name,$cc,$cc_name,$cc2,$cc_name2,$cc3,$cc_name3,$subjek,$template,$is_smtp,$usermail,$password){
$sendmail = new PHPMailer();
if($is_smtp = 'Y'){
$sendmail->IsSMTP(); // enable SMTP
// $sendmail->SMTPDebug = 1; // debugging: 1 = errors and messages, 2 = messages only
$sendmail->SMTPAuth = true; // authentication enabled
$sendmail->SMTPSecure = 'ssl'; // secure transfer enabled REQUIRED for GMail
$sendmail->Host = "192.x.x.x";
$sendmail->Port = 465; // or 587
$sendmail->Username = "xxx@xxx.com";
$sendmail->Password = "xxx";
}
$sendmail->setFrom("xxx@xxx.com","xxx@xxx.com"); //email pengirim
$sendmail->addReplyTo("xxx@xxx.com","xxx@xxx.com"); //email replay
$sendmail->addAddress($to,$to_name);
$sendmail->AddCC($cc,$cc_name);
$sendmail->AddCC($cc2,$cc_name2);
$sendmail->AddCC($cc3,$cc_name3);
$sendmail->Subject = $subjek;
$sendmail->Body=$template;
$sendmail->isHTML(true);
if(!$sendmail->Send()) {
return "failed";
}else{
return "success";
}
}
我只想找到如何将 Sendinblue 与 PHPMailer 一起使用。