0

phpを使用してWebサイトのユーザーに電子メールを送信するために使用している単純なテンプレートがあります。

なんらかの奇妙な理由で、Gmailは私のメールがスパムであると考えているようで、その結果、Gmailアドレスに送信される私のWebサイトからのすべてのメールがスパムフォルダに入れられることに気づきました。

ドメインは新しいドメインであるため、この理由は、私のサイトが何らかの方法でスパムを配信するものとしてフラグが立てられているためではないかと思います。そのため、HTMLのユーザーと、おそらくその方法に依存している必要があると結論付けました。ハイパーリンクを使用しました。

誰かが私が以下に置いた簡単な例を見て、私がこれらすべてで間違っていることを私に説明することができれば、私は長い間頭をかいていて、これは有効であるように思われるので大いに感謝します仕様によると?

ご意見、ご提案、フィードバック、ご意見をお待ちしております。ありがとうございます。

<?php
// multiple recipients
$to  = "exampleuser@gmail.com";

// subject
$subject = 'Please Confirm User Account Registration';

// message
$message = '
<html>
<head>
    <title>My Domain User Account Registration</title>
</head>
<body>
    <p>My Domain User Account Registration :</p>
    <p>We have just received a request to have your information added to our website as a user account. This would enable you to buy products on our website at <a href="http://www.mydomain.com/">http://www.mydomain.com/</a></p>
    <p>If this is correct and you do wish to create a new user account on our website, please click the link below to be directed our website.</p>
    <p><a href="http://www.mydomain.com/users/register/confirmation/confirm.php?confirm=12345&key=12345abcde">http://www.mydomain.com/users/register/confirmation/confirm.php?confirm='.$userId.'&key='.$randomKey.'</a></p>
    <p>If you received this email by mistake, simply delete it. You won&rsquo;t be subscribed if you don&rsquo;t click the confirmation link above and your email address will be removed from our database by tomorrow.</p>
    <p>For questions about this message, please contact us at : <a href="mailto: info@mydomain.com">info@mydomain.com</a></p>
    <p>Thank you.</p>
</body>
</html>
';

// To send HTML mail, the Content-type header must be set
$headers  = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";

// Additional headers
$headers .= 'From: Accounts @ www.mydomain.com <accounts@mydomain.com>' . "\r\n";

//Send the message
mail($to, $subject, $message, $headers);
?>
4

2 に答える 2

1

可能であれば、これを取り出してください:

$headers  = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";

次に、電子メールをプレーンテキストとして送信しますが、スパムとして自動的に検出されることはありません。

于 2013-01-18T12:22:07.857 に答える
0

私のホストにこの件についてかなり長い間バッジを付けた後、彼らのサーバーは基本的にスパムの送信者としてマークされていることがわかりました。そのため、問題の共有サーバー上にあった私のWebサイトからのメールは、Gmailのスパムフォルダーに自動的に送信されていました。ユーザー...

知っておくべきこと!

于 2013-05-21T23:43:31.837 に答える