PHP Mandrillライブラリに適切なFROMフィールドを設定するにはどうすればよいですか?Mandrill PHPライブラリ - FROMフィールド
Javaでは、私が使用することができます。
from = "Some Description <[email protected]>";
私はPHPで同じことをしようとすると、私はエラーを取得:このようFROMsと
Validation error: {"message":{"from_email":"The username portion of the email address is invalid (the portion before the @: Some Description
のみ電子メールを介して取得:
$from = "[email protected]";
重要な場合は、メールを送信する方法は次のとおりです。
$from = "Some Description <[email protected]>";
$message = array("subject" => $aSubject, "from_email" => $from, "html" => $aBody, "to" => $to);
$response = $mandrill->messages->send($message, $async = false, $ip_pool = null, $send_at = null);
前の1つはPHPでうまく動作し、エラーを返すコードを表示します。 –
あなたは最初のものを意味しますか? – Buffalo
は、mandrill PHPライブラリの送信者の名前をここに設定する方法を参照してくださいhttps://mandrillapp.com/api/docs/messages.php.htmlそこからパラメータはfrom_name – webDev