本文整理汇总了PHP中person::get_tasks_for_email方法的典型用法代码示例。如果您正苦于以下问题:PHP person::get_tasks_for_email方法的具体用法?PHP person::get_tasks_for_email怎么用?PHP person::get_tasks_for_email使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类person
的用法示例。
在下文中一共展示了person::get_tasks_for_email方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: person
$person = new person();
$person->read_db_record($db);
$person->set_id($db->f("personID"));
$person->load_prefs();
if (!$person->prefs["dailyTaskEmail"]) {
continue;
}
$msg = "";
$tasks = "";
$to = "";
if ($announcement["heading"]) {
$msg .= $announcement["heading"];
$msg .= "\n" . $announcement["body"] . "\n";
$msg .= "\n- - - - - - - - - -\n";
}
if ($person->get_value("emailAddress")) {
$tasks = $person->get_tasks_for_email();
$msg .= $tasks;
$subject = commentTemplate::populate_string(config::get_config_item("emailSubject_dailyDigest", ""));
$to = $person->get_value("emailAddress");
if ($person->get_value("firstName") && $person->get_value("surname") && $to) {
$to = $person->get_value("firstName") . " " . $person->get_value("surname") . " <" . $to . ">";
}
if ($tasks && $to) {
$email = new email_send($to, $subject, $msg, "daily_digest");
if ($email->send()) {
echo "\n<br>Sent email to: " . $to;
}
}
}
}