0
我想發送郵件到Windows服務器使用PHP,但我沒有發送郵件。 請使用Windows Server 2008發送實際的代碼發送郵件...發送郵件通過Windows 2008服務器使用PHP
$name=trim($_POST['name']);
$email=trim($_POST['email']);
$message=trim($_POST['textarea']);
ini_set("SMTP","gmail-smtp-in.l.google.com");
ini_set("smtp_port",25);
ini_set("sendmail_path","/usr/local/bin/sendmail");
ini_set("sendmail_from","$email");
$subject="One Request from ".$name;
$ new_msz = 「我的名字是: - 」。$名字。 「我的電子郵件ID: - 」 $電子郵件」消息: - 「。$ message;
$email_id="[email protected]";
if(mail($email_id,$subject,$new_msz,$email))
{
$ms="Successfully sent";
$msz=base64_encode($ms);
header("Location:write-us.php?da=$msz");
}
else
{
$ms="Something problem try again";
$msz=base64_encode($ms);
header("Location:write-us.php?da=$msz");
}
你可以給我發送代碼嗎... – 2014-09-02 07:24:26
我沒有訪問.ini和.htaccess文件,因爲我有共享主機請幫忙@cezar – 2014-09-02 07:34:32
非常感謝你@CEZAR。 謝謝。 謝謝。 – 2014-09-03 09:56:00