本文整理汇总了PHP中email::sendinfo方法的典型用法代码示例。如果您正苦于以下问题:PHP email::sendinfo方法的具体用法?PHP email::sendinfo怎么用?PHP email::sendinfo使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类email
的用法示例。
在下文中一共展示了email::sendinfo方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: send
public function send($to, $subject, $message)
{
$db = new Database();
$db->connect();
$from = $this->userid;
$today = date('Y-m-d H:i:s');
$query = "insert into message \n\t\t(`id`, `senderid`, `receiverid`, `messagestatusid`, `subject`, `text`, `timestamp`) \n\t\tVALUES \n\t\t(NULL, '" . $from . "','" . $to . "','1','" . $subject . "','" . $message . "','" . $today . "')";
$db->query($query);
$body = "<font face=arial size=2>" . $this->getname('user', $from) . " has sent you a new message!<br><br>Please login at <a href='http://www.harvardconnection.co'>http://www.harvardconnection.co</a> to view the message.<br><br>Thanks,<br>The Harvardconnection Team";
email::sendinfo($this->getemail($to), 'New Message', $body);
return;
}
示例2: confirm
public function confirm($uid, $rid)
{
$db = new Database();
$db->connect();
$query = "\n\t\t\t\tupdate relationship\n\t\t\t\tset `confirmed`='1'\n\t\t\t\twhere (`senderid`='" . $uid . "' and `receiverid`='" . $rid . "')\n\t\t\t\tor (`senderid`='" . $rid . "' and `receiverid`='" . $uid . "') limit 1";
//echo $query;
$db->query($query);
$body = "<font face=arial size=2>" . $this->getname('user', $uid) . " confirmed your request.<br><br>Please login at <a href='http://www.harvardconnection.co'>http://www.harvardconnection.co</a> to view their profile.<br><br>Thanks,<br>The Harvardconnection Team";
email::sendinfo(Relationship::getemail($rid), 'Request Confirmed', $body);
return 1;
}