【資料來源 :http://www.real-blog.com/programming/416 】
PHPMailer 是一個功能豐富的函式庫,以下是用 PHPMailer 通過遠端 SMTP 認證發送郵件的例子:
-
<?php
-
// 建立 PHPMailer 物件及設定 SMTP 登入資訊
-
require("../phpMailer/class.phpmailer.php");
-
$mail = new PHPMailer();
-
$mail->IsSMTP(); // send via SMTP