相关疑难解决方法(0)

PHP邮件程序您必须至少提供一个电子邮件地址

require_once('phpmailer/class.phpmailer.php');

function smtpmailer($to,$from,$subject,$body) { 
    define('GUSER', 'xxx'); // Gmail username
    define('GPWD', 'xxx'); // Gmail password
    printf("list:".$to);
    $recipient = array ($to);
    global $error;
    $mail = new PHPMailer();  // create a new object
    $mail->IsSMTP(); // enable SMTP
    $mail->SMTPDebug = 1;  // debugging: 1 = errors and messages, 2 = messages only
    $mail->SMTPAuth = true;  // authentication enabled
    $mail->SMTPSecure = 'ssl'; // secure transfer enabled REQUIRED for Gmail
    $mail->Host = 'smtp.gmail.com';
    $mail->Port = 465; 
    $mail->Username = GUSER;  
    $mail->Password = GPWD;           
    $mail->SetFrom($from, "Bank Negara");
    $mail->Subject …
Run Code Online (Sandbox Code Playgroud)

php phpmailer

0
推荐指数
1
解决办法
2万
查看次数

标签 统计

php ×1

phpmailer ×1