0

私は 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";
    }
}

PHPMailer で Sendinblue を使用する方法を見つけたいだけです。

4

1 に答える 1