php通过joomla jmail 类使用 gmail smtp 账号发送邮件
<?php jimport('joomla.mail.mail'); $mail = new JMail(); $mail->setsender("useremail"); $mail->addRecipient("destination@email.com"); $mail->setSubject("Here goes the subject"); $mail->setbody("The body of mail"); $mail->addAttachment('c:\\1.pdf'); $mail->useSMTP(true, "smtp.gmail.com", "useremail", "password",'ssl',465); $mail->send(); ?>