我試過編輯一個使用PostageAPP.com API調用的PHP郵件程序。多郵箱php郵箱
但是,當我向2個收件人發送測試郵件進行測試時,他們會看到彼此的電子郵件地址。
在文檔的網站,他們說:
As an array. This way recipients only see their own email address:
"recipients" : ["[email protected]", "[email protected]"]
但我想這不是寫在PHP。
默認的PHP代碼:
function some_func() {
$to = array($_POST['email'] => array('name' => $_POST['variable']));
# The subject of the message
$subject = $_POST['subject'];
# Setup some headers
$header = array(
'From' => '[email protected]',
'Reply-to' => '[email protected]'
);
# The body of the message
$mail_body = 'sample_parent_layout';
# Send it all
$response = PostageApp::mail($to, $subject, $mail_body, $header);
return $response;
}
if (isset($_POST['email']) && $_POST['email'] !='') {
# Processes the form if the email has been entered (see below)
$response = process_submited_form();
}
$api_key = (POSTAGE_API_KEY == 'ENTER YOUR API KEY HERE') ? null : POSTAGE_API_KEY
HTML表單,我過去的電子郵件列表:
<label> To
<td width="41%"><font size="-3" face="Verdana, Arial, Helvetica,sans-serif">
<textarea name="email" cols="30" rows="10"></textarea>
</label>
請幫我!我無法手動將郵件發送到每封電子郵件。
:// github.com/postageapp/example-app-php/blob/master/postageapp_class.inc)?如果是這樣,你需要改變'mail'方法來考慮多個收件人。 – prodigitalson 2014-12-03 04:22:12
你好,是的,我正在使用的例子。你能告訴我在這裏改變什麼嗎?如果你可以看看例子的源代碼!非常感謝 – 2014-12-03 04:24:49