本文整理汇总了PHP中mailer::setText方法的典型用法代码示例。如果您正苦于以下问题:PHP mailer::setText方法的具体用法?PHP mailer::setText怎么用?PHP mailer::setText使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类mailer
的用法示例。
在下文中一共展示了mailer::setText方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: sendAlert
/**
*
* @access public
* @param id
*
*/
public function sendAlert($id)
{
$mail = new mailer();
$user = new users();
// send alert email !
$row = $user->getUser($id);
$emailTo = $row['user'];
$to[] = $emailTo;
$subject = "Alert: Hours spent have exceeded planned hours";
$mail->setSubject($subject);
$text = "Hello " . $emailTo . ",\n\t\t\t\t\t\t\t\t\n\t\t\tThis is a friendly reminder that you have surpassed\n\t\t\t\t\t\t\t\t\n\t\t\tthe estimated hours for this project. While we \n\t\t\t\t\t\t\t\t\t\n\t\t\tunderstand it is impossible to meet every deadline\n\t\t\t\t\t\t\t\t\t\n\t\t\twe encourage you to be as diligent as possible with\n\t\t\t\t\t\t\t\t\t\n\t\t\tyour workload.";
$mail->setText($text);
$mail->sendMail($to);
}