本文整理匯總了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;
}