2015-06-28 116 views
-3

我在plesk上有一个域,我想弄清楚smtp地址和端口,以便在我的联系我们web窗体中使用它们 我已经使用了webmail.domainname(也使用了mail.domainname和smtp .domainname),但因此未工作 任何建议,将不胜感激SMTP地址和端口

回答

0

你实际上并不需要使用它们,你可以尝试这样的:

$mail_to_send_to = "[email protected]"; 
        $your_feedbackmail = "[email protected]"; 

        $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"); 
                } 
        }