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