早上好,我想删除使用 php 发送电子邮件时的 gmail 警告“gmail 无法验证 ...@... 已发送此邮件”。
我知道这是因为我使用了没有身份验证的电子邮件功能 php 所以我尝试了 PHPMailer 和 PHP pear 但页面一直转动直到无限并且什么也没发生。我的主人是 1&1。我尝试使用 gmail 而不是 smtp 和 account 而不是 1&1 但结果相同。
<?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, …Run Code Online (Sandbox Code Playgroud)