简体   繁体   中英

How to fix configuration of Mails with Plesk

I bought a cloud server web in 1and1 and I need to confifure myself the server. I trying to submit mails in Plesk but I have this error

spf=neutral (google.com: 82.165.121.94 is neither permitted nor denied by best guess record for domain of zfez5fzzovf@frontwebdesign.fr) smtp.mailfrom=zfez5fzzovf@frontwebdesign.fr; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com

I'm trying to add a SPF and Dmarc in the DNS settings, but I have got my mails in SPAM.

SPF config = TXT v=spf1 -all
DMARC config = v=DMARC1; p=none

I dont understand why my mails are again in spam.

Look at my PHP Mail Submit :

<?php
$to = "paul.wattellier@frontwebdesign.fr";
$subject = "Contact Site Internet";

$message = "
<html>
<head>
<title>Site Projet </title>
</head>
<body>
<p>Cet email est un test</p>
<table>
<tr>
<th>Firstname</th>
<th>Lastname</th>
</tr>
<tr>
<td>John</td>
<td>Doe</td>
</tr>
</table>
</body>
</html>
";

// Always set content-type when sending HTML email
$headers = "MIME-Version: 1.0" . "\r\n";
$headers .= "Content-type:text/html;charset=UTF-8" . "\r\n";

// More headers
$headers .= 'From: <wattellierpaulo@gmail.com>' . "\r\n";

mail($to,$subject,$message,$headers);
echo 'fait!';
?>

Thx for helping

It's because you're forging the from address; You're sending from your local server but using a gmail From address. Gmail doesn't allow you to send messages from gmail addresses from non-gmail servers, so either change your from address to one you are allowed to send from, or rewrite your script to send through gmail, such as by using PHPMailer.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM