2017-02-03 3 views
0

Die Situation:PHPMailer Mails geht direkt auf Spam

eine Funktion in PHP mit PHPMailer Schreiben für einen Website-Account-Aktivierung Mails.

Das Problem:

Alle meine Mails statt Posteingang direkt in den Spam-Ordner geht. Nur gmail-Adressen empfangen meine Mails korrekt.

Mein Code:

<?php 
/******************************************************************************************************************************** 
File: sendmail.php 
Author: Burtscher Florian 
Date: 02.02.2017 
Description: 
    This file contains the sendmail functions for mailing noreply messages to EmailClients. 
***************************************************************************************************************************/ 

require 'PHPMailer-master/PHPMailerAutoload.php'; 


$result = sendmail('asdf','asdf','asdf','asdf'); 

if(!$result){ 
    echo $result; 
} 


function sendmail($to,$subject,$message,$name){ 
    $mail = new PHPMailer; 

    //$mail->SMTPDebug = 3; 

    $mail->isSMTP(); // Set mailer to use SMTP 
    $mail->Host = 'smtp.world4you.com';    //'smtp1.example.com;smtp2.example.com';  // Specifay main and backup SMTP server 
    $mail->SMTPAuth = true;                 // Enable SMTP authentication 
    $mail->Username = '[email protected]'; 
    $mail->Password = '*************'; 
    $mail->SMTPSecure = 'tls'; 
    $mail->Port = 587;                 // TCP port to connect 

    $mail->setFrom('[email protected]', 'Activation'); 
    $mail->addAddress('[email protected]', 'Florian Burtscher');   // Add a recipient 
    $mail->addReplyTo('[email protected]', 'Office');        // Add Reply To 

    $mail->isHTML(true); 

    $mail->Subject = 'Here is a Subject'; 
    $mail->Body = 'This is the HTML message body <b>in bold!</b>'; 
    $mail->AltBody = 'This is the body in plain text for non-HTML mail clients'; 

    $mail->DKIM_domain = 'scritex.com'; 
    $mail->DKIM_private = '.htkeyprivate'; 
    $mail->DKIM_selector = 'dkim11'; 
    $mail->DKIM_passphrase = '1486107933'; 

    if(!$mail->send()){ 
    return $mail->ErrorInfo; 
    }else{ 
    return true; 
    } 
} 
?> 

Ergebnis:

Find result here

Ich habe keine Ahnung, was zu tun ist. Wer kennt dieses Problem?

Alle meine Mails gehen an Hotmail, Outlook, Yahoo, GMX, AON, MSN Spam!

+0

http://stackoverflow.com/questions/16717257/phpmailer-mails-going-straight-to-spam –

+0

mail-tester.com könnte Ihnen einen Hinweis geben. – Matt

Antwort

0

Die Senderservicedomäne ist auf der schwarzen Liste. Versuchen Sie es mit einem anderen SMTP-Dienst. Wenn das nicht hilft, kann die Domäne, die Sie verwenden (scritex.com), auf die schwarze Liste gesetzt werden. Von dort gibt es 2 mögliche Lösungen: 1. Whitelist Ihre Domain (es gibt mehrere Dienste, die dies tun, aber es ist ein langwieriger und lästiger Prozess). 2. Verwenden Sie eine andere Domäne

Verwandte Themen