私は WP 3.1 のインストールでこの小さな豚のような設定をしています。
問題は、電子メールを受信すると、「myemail@mydomain.com」ではなく、私の Web ホスト サーバー名が表示されることです。
それを修正できる方法はありますか?また、物事をきれいに保つためにBCCとして使用したい「コピーを私に送信」機能もあります。前もって感謝します!
これが私のsendmail.phpです」
require_once("../../../../wp-load.php");
$mail = addslashes($_POST["mailForm"]);
$mail = nl2br($mail);
$from_mail = addslashes($_POST['from_mail']);
$to = wpts_get_option("general", "contact_email");
/* subject */
$subject = "New Contact Message - ATOM";
/* message */
$message = $mail;
/* To send HTML mail, you can set the Content-type header. */
$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
/* and now mail it */
if(@mail($to, $subject, $message, $headers))
{
?>
<div class="success">
<div class="box-content"><?php _e("Done! We'll contact you in few moments!", 'atom'); ?></div>
<div class="clearboth"></div>
</div>
<?php
}
else
{
?>
<div class="error">
<div class="box-content"><?php _e("Oh, sorry! Something wrong... Please, try again.", 'atom');?></div>
<div class="clearboth"></div>
</div>
<?php
}
?> " そしてここに私の sendorder.php があります "
require_once("../../../../wp-load.php");
$myemail = wpts_get_option("ordernow", "order_email");
$name = addslashes($_POST["name"]);
if($name == '') {
?>
<div class="error">
<div class="box-content"><?php _e("Please insert your name.", 'atom'); ?></div>
<div class="clearboth"></div>
</div>
<?php
exit;
}
$email = addslashes($_POST["email"]);
if($email == '') {
?>
<div class="error">
<div class="box-content"><?php _e("Please insert a email address.", 'atom'); ?></div>
<div class="clearboth"></div>
</div>
<?php
exit;
}
$finalOrder = nl2br( addslashes($_POST["finalOrder"]) );
$uploads = addslashes($_POST["uploads"]);
$files = explode(";", $uploads);
$uploads = '';
for($i = 0; $i < count($files); $i++) {
$uploads .= '- <a href="'.$files[$i].'" target="_blank">'.$files[$i].'</a><br />';
}
$message = str_replace("uploads_here", $uploads, $finalOrder);
/* subject */
$subject = "New Order/Quote Request";
/* To send HTML mail, you can set the Content-type header. */
$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
$to = $myemail.','.$email;
/* and now mail it */
if(@mail($to, $subject, $message, $headers))
{
?>
<div class="success">
<div class="box-content"><?php _e("Done! You'll receive a order copy in your email.", 'atom'); ?></div>
<div class="clearboth"></div>
</div>
<?php
}
else
{
?>
<div class="error">
<div class="box-content"><?php _e("Oh, sorry! Something wrong... Please, try again.", 'atom');?></div>
<div class="clearboth"></div>
</div>
<?php
}
?> "