On the website of the local footballteam (enter link description here which is hosted by One.com, I programmed a soccer betting for the 8 matches of every matchday (8 matches). When the user has filled in the form and submit it, he recieves a mail with his betting and the webmaster receives a copy as Bcc. The mail is sent from the main mailbox of the domain doskobeveren.be: info@doskobeveren.be to the mail-address of the user.
Since the season 2013-2014 and the first 28 weeks of the season 2014-2015 the script has always worked fine (= 58 weeks). But since last week the Bcc part of the script gives for every mail a "Undelivered Mail Returned to Sender" in the main mailbox (info@doskobeveren.be) instead of the mailbox of the webmaster.
That mail says: Reporting-MTA: dns; mail-out2.one.com X-Postfix-Queue-ID: 9ABF0552A2 X-Postfix-Sender: rfc822; info@doskobeveren.be Arrival-Date: Wed, 15 Apr 2015 17:36:16 +0200 (CEST)
Final-Recipient: rfc822; webmaster@doskobeveren.be Original-Recipient: rfc822;webmaster@doskobeveren.be Action: failed Status: 5.7.1 Remote-MTA: dns; mxcluster2.one.com Diagnostic-Code: smtp; 550 5.7.1 Blocked by email filter
(27ec3383-e385-11e4-9d60-b82a72d88088)
The support of One.com tells me that these are the reasons:
- Wrong Message-ID.
- The used domainname is not correct.
Because the mail is made by the webpage, I wonder if the PHP-script causes, for wathever reason after the 58 weeks of good working, suddenly the problem?
The PHP comes from: enter link description here
enter code here
<h3>Dit bericht zal u per mail ontvangen:</h3>
<?php
$pronomail ='';
$pronomail = $_SESSION['username']. ", u heeft de volgende pronostiek ingestuurd voor speeldag " .$speeldag. "
";
for($i=1; $i<=8; $i++){
$pronomail .= "wedstrijd " .$i. ": " .$wedstrijd[$i]. " = ";
switch ($i) {
case 1:
$pronomail .= "Prono1: " .$k1w1. " - Prono2: " .$k2w1. " - Prono3: " .$k3w1. "
";
break;
case 2:
$pronomail .= "Prono1: " .$k1w2. " - Prono2: " .$k2w2. " - Prono3: " .$k3w2. "
";
break;
case 3:
$pronomail .= "Prono1: " .$k1w3. " - Prono2: " .$k2w3. " - Prono3: " .$k3w3. "
";
break;
case 4:
$pronomail .= "Prono1: " .$k1w4. " - Prono2: " .$k2w4. " - Prono3: " .$k3w4. "
";
break;
case 5:
$pronomail .= "Prono1: " .$k1w5. " - Prono2: " .$k2w5. " - Prono3: " .$k3w5. "
";
break;
case 6:
$pronomail .= "Prono1: " .$k1w6. " - Prono2: " .$k2w6. " - Prono3: " .$k3w6. "
";
break;
case 7:
$pronomail .= "Prono1: " .$k1w7. " - Prono2: " .$k2w7. " - Prono3: " .$k3w7. "
";
break;
case 8:
$pronomail .= "Prono1: " .$k1w8. " - Prono2: " .$k2w8. " - Prono3: " .$k3w8. "
";
break;
}
}
$pronomail .= " Veel succes!
";
$bericht =str_replace("
","<br />",$pronomail);
echo $bericht. "<br />";
//define the receiver of the email
$to = $_SESSION['email'];
//define the subject of the email
$subject = 'Pronostiek';
//define the message to be sent. Each line should be separated with
$message = $pronomail;
//define the headers we want passed. Note that they are separated with
$headers = "From: info@doskobeveren.be
Bcc: webmaster@doskobeveren.be
";
$headers .= "Message-ID: <" . md5(uniqid(time())) . $_SERVER['SERVER_NAME']. ">
";
$headers .= "MIME-Version: 1.0
";
$headers .= "Date: ".date("D, d M Y H:i:s") . "
";
//$headers .= "Reply-To: info@mydomain.com
";
$headers .= "X-Priority: 3
X-MSMail-Priority: Normal
";
$headers .= "X-Mailer: PHP/".phpversion()."
";
$headers .= "X-MimeOLE: Produced By MyDomain
";
$headers .= "Content-type: text/plain; charset=iso-8859-1
";
//$headers .= "Date: .date('r', $_SERVER['REQUEST_TIME'])
";
//send the email
$mail_sent = @mail( $to, $subject, $message, $headers );
//if the message is sent successfully print "Mail sent". Otherwise print "Mail failed"
echo $mail_sent ? "Mail is verstuurd" : "Mail kon niet verstuurd worden";
?>
==========
Does someone can give me a solution please? Thanks.