我的WP3.1装置上有一只小猪, 它应该是一个很好的联系形式。
问题是,当我收到电子邮件时,它显示的不是“[email protected] ,而是“”我的网络主机服务器名。
Is there ANY way I could correct that? And there is also a "send a copy to me" function which I would like to use as a BCC just to keep things clean. THANK YOU IN ADVANCE!
Here is my 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
";
$headers .= "Content-type: text/html; charset=iso-8859-1
";
/* 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
}
?> " And here is my 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
";
$headers .= "Content-type: text/html; charset=iso-8859-1
";
$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
}
?> "