1 回答

TA貢獻(xiàn)1789條經(jīng)驗(yàn) 獲得超10個(gè)贊
嘗試作為批量消息發(fā)送
$mgClient = Mailgun::create(MAILGUN_API_KEY);
$builder= $mgClient->messages()->getBatchMessage("somedomain.com");
//regular stuff
$builder->setFromAddress("updates@somedomain.com", array("first"=>"Some Domain"));
foreach ($subscribers as $key => $value)
$builder->addToRecipient($value['email']);
$builder->setSubject($subject);
$builder->setHtmlBody(include("email-templates/emailSubscribers.php"));
if(strlen($attachment) > 20)
$builder->addAttachment($attachment);
$builder->finalize(); //equivalent of ->send
- 1 回答
- 0 關(guān)注
- 123 瀏覽
添加回答
舉報(bào)