电子邮件地址未以正确格式显示,如myname@mycompany.com - PHP

时间:2013-05-02 10:46:52

标签: php

我正在尝试编写PHP脚本代码,我正在尝试将邮件发送到指定的电子邮件地址,我从Java的POST变量中收集这些邮件。然而,我起初能够发送邮件,但在我曾经收到的电子邮件中收到如下警告:此邮件可能尚未发送:XxX@gmail.com了解详情报告网络钓鱼。然后我才知道我需要有一个与我的域名相关联的电子邮件,在收到我的邮件之后我的邮件没有发送此警告,但我发送的电子邮件地址既没有显示也没有像mydomainname @ rsb29那样。 rhostbh.com。我怎样才能解决这个问题? 下面是我的PHP脚本:

        $email = $_POST["email"];

        $pass = "0";

        $pass = mysql_query("SELECT password FROM `seller` WHERE email = '$email'");

        $myrow = mysql_fetch_array($pass);

        if ($pass){

            $to = $email;
            $subject = "no reply, CarList Password Request";
            $message = "Hello! \n This is in response to your request for your password. \n\n\rE-mail Id: ".$email."\n\rPassword: " .$myrow[password] . "\n\n\n\r If you've received this mail in error, it's likely that another user entered your email address by mistake while trying to reset a password. If you didn't initiate the request, you don't need to take any further action and can safely disregard this email." ;

            $from = "myapp@mydomainname.com"; // changed for security reason
            $headers = "From:" . $from;
            mail($to,$subject,$message,$headers);

            echo $myrow[password];


    }else{
            echo 'Fail';
    } 

0 个答案:

没有答案