Mensen,
Ik zit met een probleem: mails die ik verstuur met mijn phpmailer script worden door Outlook/Live mail als SPAM gezien. GMail e.d. komen netjes in de inbox terecht en ik heb ook wat spamlijsten gecheckt, maar daar zie ik geen vermeldingen van mijn IP of webadres in voor komen.
Het script wat ik heb is dit:
Is er iemand die me kan vertellen wat ik nog kan doen? Want ik heb het idee dat ik weinig geks doe hier....PHP Code:
include('./mailing.php');
// Include de class t.b.v. mailen van bevestiging
include("./phpmailer/class.phpmailer.php");
//mailen aan boeker
// Maak een instantie van het object aan
$mail = new PHPMailer(true);
//reply to tegen de spam
$mail->AddReplyTo( 'info@url.com', 'Naam' );
$mail->ReturnPath='info@url.com';
// Geef aan dat het een HTML mail betreft
$mail->IsHTML(true);
// Geef de afzender aan
$mail->From = "info@url.com";
$mail->FromName = "Naam";
// Bepaal de geadresseerden
$mail->ClearAllRecipients();
// Eerste geadresseerde
$mail->AddAddress($_POST['email']);
// Inhoud van de mail
$mail->Subject = 'Boeking bij naam';
$tekstvoorboeker = 'Beste '.$_POST['naam'].',<br /><br />
Heel verhaal in platte tekst, opgemaakt met HTML-tags';
$mail->Body = mailing($tekstvoorboeker);
// Maximaal aantal karakters
$mail->WordWrap = 20000000;
// Probeer de mail te versturen
if($mail->send()) {
//echo 'Message has been sent';
}
else
{ //echo 'Message could not be sent.';
//echo 'Mailer Error: ' . $mail->ErrorInfo;
}
Domein waarvandaan gemaild wordt betreft: https://tinyurl.com/ydbe4me9
Voor de volledigheid nog de inhoud van mailing.php:
PHP Code:
<?php
function mailing($tekst,$onderwerp,$titel){$output = '<!doctype html><html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office"> <head> <!-- NAME: FLYER --> <!--[if gte mso 15]> <xml> <o:OfficeDocumentSettings> <o:AllowPNG/> <o:PixelsPerInch>96</o:PixelsPerInch> </o:OfficeDocumentSettings> </xml> <![endif]--> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>'.$onderwerp.'</title> <style type="text/css"> p{ margin:10px 0; padding:0; } table{ border-collapse:collapse; } h1,h2,h3,h4,h5,h6{ display:block; margin:0; padding:0; } img,a img{ border:0; height:auto; outline:none; text-decoration:none; } body,#bodyTable,#bodyCell{ height:100%; margin:0; padding:0; width:100%; } #outlook a{ padding:0; } img{ -ms-interpolation-mode:bicubic; } table{ mso-table-lspace:0pt; mso-table-rspace:0pt; } .ReadMsgBody{ width:100%; } .ExternalClass{ width:100%; } p,a,li,td,blockquote{ mso-line-height-rule:exactly; } a[href^=tel],a[href^=sms]{ color:inherit; cursor:default; text-decoration:none; } p,a,li,td,body,table,blockquote{ -ms-text-size-adjust:100%; -webkit-text-size-adjust:100%; } .ExternalClass,.ExternalClass p,.ExternalClass td,.ExternalClass div,.ExternalClass span,.ExternalClass font{ line-height:100%; } a[x-apple-data-detectors]{ color:inherit !important; text-decoration:none !important; font-size:inherit !important; font-family:inherit !important; font-weight:inherit !important; line-height:inherit !important; } a.mcnButton{ display:block; } .mcnImage{ vertical-align:bottom; } .mcnTextContent{ word-break:break-word; } .mcnTextContent img{ height:auto !important; } .mcnDividerBlock{ table-layout:fixed !important; } body,#bodyTable{ background-color:white; } #bodyCell{ border-top:0; } h1{ color:#a1cf03 !important; font-family:Helvetica; font-size:40px; font-style:normal; font-weight:bold; line-height:100%; letter-spacing:-1px; text-align:center; } h2{ color:#404040 !important; font-family:Helvetica; font-size:26px; font-style:normal; font-weight:bold; line-height:125%; letter-spacing:-.75px; text-align:left; } h3{ color:#a1cf03 !important; font-family:Helvetica; font-size:18px; font-style:normal; font-weight:bold; line-height:125%; letter-spacing:-.5px; text-align:left; } h4{ color:#808080 !important; font-family:Helvetica; font-size:16px; font-style:normal; font-weight:bold; line-height:125%; letter-spacing:normal; text-align:left; } .headerContainer .mcnTextContent a{ color:#a1cf03; font-weight:normal; text-decoration:underline; } #templateBody{ background-color:#EEEEEE; border-top:0; border-bottom:0; } #bodyBackground{ background-color:#FFFFFF; border:1px solid #D5D5D5; } .bodyContainer .mcnTextContent,.bodyContainer .mcnTextContent p{ color:#606060; font-family:Helvetica; font-size:15px; line-height:150%; text-align:left; } .bodyContainer .mcnTextContent a{ color:#a1cf03; font-weight:normal; text-decoration:underline; } #templateFooter{ background-color:white; border-top:1px solid #000000; border-bottom:0; } .footerContainer .mcnTextContent,.footerContainer .mcnTextContent p{ color:#CCCCCC; font-family:Helvetica; font-size:11px; line-height:125%; text-align:center; } .footerContainer .mcnTextContent a{ color:#CCCCCC; font-weight:normal; text-decoration:underline; } @media only screen and (max-width: 480px){ body,table,td,p,a,li,blockquote{ -webkit-text-size-adjust:none !important; }
} @media only screen and (max-width: 480px){ body{ width:100% !important; min-width:100% !important; }
} @media only screen and (max-width: 480px){ .templateContainer{ max-width:600px !important; width:100% !important; }
} @media only screen and (max-width: 480px){ .mcnImage{ height:auto !important; width:100% !important; }
} @media only screen and (max-width: 480px){ .mcnCaptionTopContent,.mcnCaptionBottomContent,.mcnTextContentContainer,.mcnBoxedTextContentContainer,.mcnImageGroupContentContainer,.mcnCaptionLeftTextContentContainer,.mcnCaptionRightTextContentContainer,.mcnCaptionLeftImageContentContainer,.mcnCaptionRightImageContentContainer,.mcnImageCardLeftTextContentContainer,.mcnImageCardRightTextContentContainer{ max-width:100% !important; width:100% !important; }
} @media only screen and (max-width: 480px){ .mcnBoxedTextContentContainer{ min-width:100% !important; }
} @media only screen and (max-width: 480px){ .mcnImageGroupContent{ padding:9px !important; }
} @media only screen and (max-width: 480px){ .mcnCaptionLeftContentOuter .mcnTextContent,.mcnCaptionRightContentOuter .mcnTextContent{ padding-top:9px !important; }
} @media only screen and (max-width: 480px){ .mcnImageCardTopImageContent,.mcnCaptionBlockInner .mcnCaptionTopContent:last-child .mcnTextContent{ padding-top:18px !important; }
} @media only screen and (max-width: 480px){ .mcnImageCardBottomImageContent{ padding-bottom:9px !important; }
} @media only screen and (max-width: 480px){ .mcnImageGroupBlockInner{ padding-top:0 !important; padding-bottom:0 !important; }
} @media only screen and (max-width: 480px){ .mcnImageGroupBlockOuter{ padding-top:9px !important; padding-bottom:9px !important; }
} @media only screen and (max-width: 480px){ .mcnTextContent,.mcnBoxedTextContentColumn{ padding-right:18px !important; padding-left:18px !important; }
} @media only screen and (max-width: 480px){ .mcnImageCardLeftImageContent,.mcnImageCardRightImageContent{ padding-right:18px !important; padding-bottom:0 !important; padding-left:18px !important; }
} @media only screen and (max-width: 480px){ .mcpreview-image-uploader{ display:none !important; width:100% !important; }
} @media only screen and (max-width: 480px){ h1{ font-size:24px !important; line-height:125% !important; }
} @media only screen and (max-width: 480px){ h2{ font-size:20px !important; line-height:125% !important; }
} @media only screen and (max-width: 480px){ h3{ font-size:18px !important; line-height:125% !important; }
} @media only screen and (max-width: 480px){ h4{ font-size:16px !important; line-height:125% !important; }
} @media only screen and (max-width: 480px){ .mcnBoxedTextContentContainer .mcnTextContent,.mcnBoxedTextContentContainer .mcnTextContent p{ font-size:18px !important; line-height:125% !important; }
} @media only screen and (max-width: 480px){ #templatePreheader{ display:block !important; }
} @media only screen and (max-width: 480px){ .preheaderContainer .mcnTextContent,.preheaderContainer .mcnTextContent p{ font-size:14px !important; line-height:115% !important; }
} @media only screen and (max-width: 480px){ .headerContainer .mcnTextContent,.headerContainer .mcnTextContent p{ font-size:18px !important; line-height:125% !important; }
} @media only screen and (max-width: 480px){
.bodyContainer .mcnTextContent,.bodyContainer .mcnTextContent p{ font-size:18px !important; line-height:125% !important; }
} @media only screen and (max-width: 480px){ .footerContainer .mcnTextContent,.footerContainer .mcnTextContent p{ font-size:14px !important; line-height:115% !important; }
}</style></head> <body leftmargin="0" marginwidth="0" topmargin="0" marginheight="0" offset="0"> <center> <table align="center" border="0" cellpadding="0" cellspacing="0" height="100%" width="100%" id="bodyTable"> <tr> <td align="center" valign="top" id="bodyCell"> <!-- BEGIN TEMPLATE // --> <table border="0" cellpadding="0" cellspacing="0" width="100%"> <tr> <td align="center" valign="top"> <!-- BEGIN PREHEADER // --> <table border="0" cellpadding="0" cellspacing="0" width="100%" id="templatePreheader"> <tr> <td align="center" valign="top"> <table border="0" cellpadding="0" cellspacing="0" width="600" class="templateContainer"> <tr> <td valign="top" class="preheaderContainer" style="padding-top:10px; padding-bottom:10px;"><table border="0" cellpadding="0" cellspacing="0"width="100%" class="mcnTextBlock" style="min-width:100%;"> </table></td> </tr> </table> </td> </tr> </table> <!-- // END PREHEADER --> </td> </tr> <tr> <td align="center" valign="top"> <!-- BEGIN HEADER // --> <table border="0" cellpadding="0" cellspacing="0" width="100%" id="templateHeader"> <tr> <td align="center" valign="top"> <table border="0" cellpadding="0" cellspacing="0" width="600" class="templateContainer"> <tr> <td valign="top" class="headerContainer" style="padding-top:15px; padding-bottom:10px;"><table border="0" cellpadding="0" cellspacing="0"width="100%" class="mcnImageBlock" style="min-width:100%;"> <tbody class="mcnImageBlockOuter"> <tr> <td valign="top" style="padding:9px" class="mcnImageBlockInner"> <table align="left" width="100%" border="0" cellpadding="0" cellspacing="0" class="mcnImageContentContainer" style="min-width:100%;"> <tbody><tr> <td class="mcnImageContent" valign="top" style="padding-right: 9px; padding-left: 9px; padding-top: 0; padding-bottom: 0; text-align:center;"> <img align="center" alt="" src="http://www.villaroccaccia.com/wp-content/uploads/2017/03/cropped-logo2.jpg" width="155"style="max-width:155px; padding-bottom: 0; display: inline !important; vertical-align: bottom;" class="mcnImage"> </td> </tr> </tbody></table> </td> </tr> </tbody></table></td> </tr> </table> </td> </tr> </table> <!-- // END HEADER --> </td> </tr> <tr> <td align="center" valign="top"> <!-- BEGIN BODY // --> <table border="0" cellpadding="0" cellspacing="0" width="100%" id="templateBody"> <tr> <td align="center" valign="top" style="padding-top:10px; padding-right:10px; padding-bottom:5px; padding-left:10px;"> <table border="0" cellpadding="0" cellspacing="0" width="600" class="templateContainer"> <tr> <td align="center" valign="top"> <table border="0" cellpadding="0" cellspacing="0" width="100%" id="bodyBackground"> <tr> <td valign="top" class="bodyContainer" style="padding-top:10px; padding-bottom:10px;"><table border="0" cellpadding="0"cellspacing="0" width="100%" class="mcnTextBlock" style="min-width:100%;"> <tbody class="mcnTextBlockOuter"> <tr> <td valign="top" class="mcnTextBlockInner"> <table align="left" border="0" cellpadding="0" cellspacing="0" width="100%" style="min-width:100%;" class="mcnTextContentContainer"> <tbody><tr> <td valign="top" class="mcnTextContent" style="padding-top:9px; padding-right: 18px; padding-bottom: 9px; padding-left: 18px;"> </td> </tr> </tbody></table> </td> </tr> </tbody></table><table border="0" cellpadding="0" cellspacing="0" width="100%" class="mcnImageBlock" style="min-width:100%;"> <tbody class="mcnImageBlockOuter"> <tr> <td valign="top" style="padding:9px" class="mcnImageBlockInner"> <table align="left" width="100%" border="0" cellpadding="0" cellspacing="0" class="mcnImageContentContainer" style="min-width:100%;"> <tbody><tr> <td class="mcnImageContent" valign="top" style="padding-right: 9px; padding-left: 9px; padding-top: 0; padding-bottom: 0; text-align:center;"> </td> </tr> </tbody></table> </td> </tr> </tbody></table><table border="0" cellpadding="0" cellspacing="0" width="100%" class="mcnTextBlock" style="min-width:100%;"> <tbody class="mcnTextBlockOuter"> <tr> <td valign="top" class="mcnTextBlockInner"> <table align="left" border="0" cellpadding="0" cellspacing="0" width="100%" style="min-width:100%;" class="mcnTextContentContainer"> <tbody><tr> <td valign="top" class="mcnTextContent" style="padding-top:9px; padding-right: 18px; padding-bottom: 9px; padding-left: 18px;"> <div style="color: #222222;font-family: arial, sans-serif;font-size: small;line-height: normal;">'.str_replace('é','é',str_replace('€','€',str_replace('ë','ë',$tekst))).'</div></div></div>
</td> </tr> </tbody></table> </td> </tr> </tbody></table><table border="0" cellpadding="0" cellspacing="0" width="100%" class="mcnButtonBlock" style="min-width:100%;"> <tbody class="mcnButtonBlockOuter"> <tr> <td style="padding-top:0; padding-right:18px; padding-bottom:18px; padding-left:18px;" valign="top" align="center" class="mcnButtonBlockInner"> </td> </tr> </tbody></table></td> </tr> </table> </td> </tr> </table> </td> </tr> </table> <!-- // END BODY --> </td> </tr> <tr> <td align="center" valign="top" style="padding-bottom:40px;"> </td> </tr> </table> <!-- // END TEMPLATE --> </td> </tr> </table> </center> </body></html>
';return $output;}?>
- Door PHPMailer verzonden mails worden SPAM in Outlook
-
09-02-2018, 14:16 #1
- Berichten
- 703
- Lid sinds
- 17 Jaar
Door PHPMailer verzonden mails worden SPAM in Outlook
Laatst aangepast door Erwin S. : 09-02-2018 om 14:24
-
In de schijnwerper
Ik ga stoppen met mijn bedrijf - Domeinnamen en WP plugins zijn nog beschikbaarOverige deals[SNELLE LEVERING] Laat je website / webshop snel en professioneel bouwen!Freelance / WerkPrijsperkwh.nl - met content & affiliate kansenWebsite te koopAutoriteit links aangeboden | Hoge DR & DA + Duizenden bezoekers. Alle NICHES vrijwelOverige deals -
09-02-2018, 17:25 #2
- Berichten
- 1.735
- Lid sinds
- 17 Jaar
Re: Door PHPMailer verzonden mails worden SPAM in Outlook
Heb je sowieso SPF, DKIM etc goed ingesteld? Mijn advies is om via SMTP te mailen ipv php mailer.
https://help.dreamhost.com/hc/en-us/...mail-via-SMTP-
-
11-02-2018, 12:00 #3
- Berichten
- 703
- Lid sinds
- 17 Jaar
Re: Door PHPMailer verzonden mails worden SPAM in Outlook
DKIM e.d. zou goed moeten zijn is mij verzekerd; score volgens mail-tester.com is 10 uit 10.
Via STMP ga ik nog eens bekijken.... Want andere oplossingen weet ik ook niet meer...
-
11-02-2018, 18:16 #4
- Berichten
- 703
- Lid sinds
- 17 Jaar
Re: Door PHPMailer verzonden mails worden SPAM in Outlook
Inmiddels wat verder gekeken en volgens mijn hoster is SPF en DKIM op orde; ik zie ook een dergelijk record terug in mijn DNS management van Direct Admin, maar daar houdt het even op....
Want als ik de source van een mailtje bekijk in outlook zie ik dit soort dingen:
dkim=none (message not
signed) header.d=none;hotmail.com; dmarc=fail action=none
header.from=domein.com;
Received-SPF: Pass (protection.outlook.com: domain of serverx.hoster.nl
X-Forefront-Antispam-Report: EFV:NLI;SFV:NSPM;SFS:(98901004);DIR:INB;SFP:;SCL:1 ;SRVR:CO1NAM03HT079;H:serverx.hoster.nl;FPR:;SPF:N one;LANG:;
Dus ik twijfel of alles wel helemaal lekker gaat zo...
Mails die ik verstuur via een mailclient krijgt wel een DKIM-resultaat wat mij logisch lijkt:
DKIM-Signature: v=1; a=rsa-sha256; q.........................
Maar ook deze komen desondanks in de spambox terecht.... Is er iemand die hier iets zinnigs over kan zeggen?
-
11-02-2018, 18:41 #5
64BitsWebhosting.EU
- Berichten
- 2.085
- Lid sinds
- 18 Jaar
Re: Door PHPMailer verzonden mails worden SPAM in Outlook
Weet je zeker dat de mail niet als spam is getagged in je inbox ooit? Forefront geeft namelijk een SCL:1 aan wat betekent dat hotmail hem wel in de inbox van de user deponeert. Zie hier voor de spam confidence levels: https://technet.microsoft.com/nl-nl/...or=-2147217396
Maar als je dkim werkend wilt hebben (duh) moet je phpmailer wel laten mailen via authenticated smtp. Daarvoor moet je onder je domein een emailaccount aanmaken zoals bv.en de auth gegevens daarvan gebruiken in de config van phpmailer. Anders weet de mailserver niet met welke key hij de mail moet signen.
Code:$mail->Host = 'mail.example.com'; $mail->Port = 587; $mail->SMTPAuth = true; $mail->Username = 'noreply@domein.nl'; $mail->Password = 'jeSuperDuperSecretPa55w0rd';
Plaats een
- + Advertentie
- + Onderwerp
Marktplaats
Webmasterforum
- Websites algemeen
- Sitechecks
- Marketing
- Domeinen algemeen
- Waardebepaling
- CMS
- Wordpress
- Joomla
- Magento
- Google algemeen
- SEO
- Analytics
- Adsense
- Adwords
- HTML / XHTML
- CSS
- Programmeren
- PHP
- Javascript
- JQuery
- MySQL
- Ondernemen algemeen
- Belastingen
- Juridisch
- Grafisch ontwerp
- Hosting Algemeen
- Hardware Info
- Offtopic