我使用以下PHP代码发送电子邮件.我在Outlook和其他地方测试过,一切都正确.但是,如果我将电子邮件发送给使用Godaddy基于Web的电子邮件查看器的人,则会出现两个问题:
这已经在多台机器和浏览器上通过多个基于godaddy的帐户进行了验证.
这是我用来发送电子邮件的代码:
//build and send the email
$to = $email;
$subject = 'Confirm your subscription';
$message =( "<html>\r\n");
$message .=( "<head>\r\n");
$message .=( "<title>Confirm</title>\r\n");
$message .=( "</head>\r\n");
$message .=( "<body>\r\n");
$message .=( "<h2>Thank You for registering</h2>\r\n");
$message .=( "<p>To complete your registration, please click the link below.</p>\r\n");
$message .=(" <p><a href=\"http://www.site.com/confirmation.php?confirm=$visitor_hash\">Click here to confirm your interest.</a></p>\r\n");
$message .=( "</body>\r\n");
$message .=( "</html>\r\n");
$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n";
$headers .= "From: Site<info@site.com>\r\n";
mail($to, $subject, …Run Code Online (Sandbox Code Playgroud)