Guten Morgen, Ich möchte die Gmail-Warnung entfernen "Gmail kann nicht überprüfen, dass ... @ ... diese Nachricht gesendet", wenn ich E-Mail mit PHP senden.Entfernen Sie Gmail Warnung E-Mail nicht verifiziert, wenn Sie mit PHP senden
Ich weiß es ist, weil ich die E-Mail-Funktion PHP verwenden, die keine Authentifizierung haben, also versuche ich PHPMailer und PHP Birne aber die Seite drehen und drehen, bis das Unendliche und nichts passiert ist. Mein Host ist 1 & 1. Ich versuche mit Google Mail statt SMTP und Konto anstelle von 1 & 1, aber das gleiche Ergebnis.
<?php
// Pear Mail Library
require_once "Mail.php";
$from = '<***@motelavigna.co>'; //change this to your email address
$to = '<***@gmail.com>'; // change to address
$subject = 'Insert subject here'; // subject of mail
$body = "Hello world! this is the content of the email"; //content of mail
$headers = array(
'From' => $from,
'To' => $to,
'Subject' => $subject
);
$smtp = Mail::factory('smtp', array(
'host' => 'auth.smtp.1and1.fr',
'port' => '465',
'auth' => true,
'username' => '***@***.co', //co is not an error
'password' => '***' // your password
));
// Send the mail
$mail = $smtp->send($to, $headers, $body);
?>
danke.
Dank es funktioniert, mit einfachen emai aber nicht mit PEAR Mail, aber es ist für mich ausreichend. – bormat