本文整理汇总了PHP中email::sendEmail方法的典型用法代码示例。如果您正苦于以下问题:PHP email::sendEmail方法的具体用法?PHP email::sendEmail怎么用?PHP email::sendEmail使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类email
的用法示例。
在下文中一共展示了email::sendEmail方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: recuperaClave
public function recuperaClave($login)
{
$bd = new bd();
$correo = new email();
if (isset($login["seudonimo"])) {
$condicion = "seudonimo = '{$login["seudonimo"]}'";
} else {
$condicion = "email = '{$login["email"]}'";
}
$result = $bd->doSingleSelect($this->a_table, $condicion);
if (!empty($result)) {
//if($result["status_usuarios_id"]=='1'){
$email = $result["email"];
$link = $this->generaLinkTemporal($result["usuarios_id"], $result["seudonimo"]);
if ($link) {
$correo->sendEmail($email, $link);
return array(1, $result["usuarios_id"]);
} else {
return array(2, "");
}
//}
} else {
return array(2, "");
}
}
示例2: emailNotification
private function emailNotification($notification_id)
{
$r = $this->getNotifications(null, $notification_id);
$row = mysqli_fetch_array($r);
$to = $row['ru_email'];
$subject = 'MITRE SE - New Notification';
$message = '';
//$message='<img src="http://skillsendorsement-monmouth.rhcloud.com/images/userdp/'. $row['su_userdp'] . ' class="img-responsive voffset2" alt="img" width="60" height="60">';
if ($row['notification_name'] == "project_added") {
$message .= '<h3>' . $row['su_fname'] . ' ' . $row['su_lname'] . ':</h3>';
$message .= 'I have added a new project, ' . $row['project_name'] . '. Please approve.';
}
if ($row['notification_name'] == "project_approved") {
$message .= '<h3><span class="text-capitalize">' . $row['su_fname'] . ' </span><span class="text-capitalize">' . $row['su_lname'] . '</span>:</h3>';
$message .= 'I have approved ' . $row['project_name'] . ' project.';
}
if ($row['notification_name'] == "project_disapproved") {
$message .= '<h3><span class="text-capitalize">' . $row['su_fname'] . ' </span><span class="text-capitalize">' . $row['su_lname'] . '</span>:</h3>';
$message .= 'I have disapproved ' . $row['project_name'] . ' project.';
}
if ($row['notification_name'] == "endorsed") {
$message .= '<h3>' . $row['su_fname'] . ' ' . $row['su_lname'] . ':</h3>';
$message .= 'Congratulations! I have endorsed you for ' . $row['skill_name'] . '.';
$message .= '<br/><q>' . $row['comments'] . '</q>';
}
$message .= '<br/><br/>Login here: <a href="http://skillsendorsement-monmouth.rhcloud.com">http://skillsendorsement-monmouth.rhcloud.com</a>';
/*
echo '<br/><br/><br/><br/><br/><br/>';
echo $subject . '<br/>';
echo $to . '<br/>';
echo $message . '<br/>';
*/
// Create an object for email
$objEmail = new email();
// Send email
$objEmail->sendEmail($to, $subject, $message);
}