我在plesk上有一个域名,我想找出smtp地址和端口,以便在我的联系我们网页表单中使用它们 我使用过webmail.domainname(也使用了mail.domainname和smtp.domainname),但它没有用 任何建议将不胜感激
答案 0 :(得分:0)
您实际上不需要使用它们,您可以尝试类似:
$mail_to_send_to = "name@anydomain.tld";
$your_feedbackmail = "from@yourdomain.tld";
$sendflag = $_REQUEST['sendflag'];
if ( $sendflag == "send" )
{
$email = $_REQUEST['email'] ;
$message = $_REQUEST['message'] ;
$headers = "From: $your_feedbackmail" . "\r\n" . "Reply-To: $email" . "\r\n" ;
$a = mail( $mail_to_send_to, "Feedback Form Results", $message, $headers );
if ($a)
{
print("Message was sent, you can send another one");
} else {
print("Message wasn't sent, please check that you have changed emails in the bottom");
}
}