What is wrong with this PHP script to send mail using Pear Mail?
问题 I have this script: require_once "Mail.php"; $from = "Stephen <username@nvrforget.com>";//Google apps domain $to = "username@gmail.com"; $subject = "Hi!"; $body = "Hi,\n\nHow are you?"; $host = "mail.nvrforget.com"; $username = "username@nvrforget.com"; $password = "password"; $headers = array ('From' => $from, 'To' => $to, 'Subject' => $subject); $smtp = Mail::factory('smtp', array ('host' => $host, 'auth' => true, 'username' => $username, 'password' => $password)); $mail = $smtp->send($to,