本文整理匯總了PHP中TikiMail::setCrlf方法的典型用法代碼示例。如果您正苦於以下問題:PHP TikiMail::setCrlf方法的具體用法?PHP TikiMail::setCrlf怎麽用?PHP TikiMail::setCrlf使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類TikiMail
的用法示例。
在下文中一共展示了TikiMail::setCrlf方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: MAX
);
$res=$tikilib->query("SELECT MAX(id) as `id` FROM `tiki_invite` WHERE `inviter`=? AND `ts`=?", array($user, $tikilib->now));
$row=$res->fetchRow(); $id=$row['id'];
foreach ($emails as $m)
$tikilib->query(
"INSERT INTO `tiki_invited` (id_invite, email, firstname, lastname, used) VALUES (?,?,?,?,?)",
array($id, $m['email'], $m['firstname'], $m['lastname'], "no")
);
$_SERVER['SCRIPT_URI'] = empty($_SERVER['SCRIPT_URI']) ? 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] : $_SERVER['SCRIPT_URI'];
foreach ($emails as $m) {
$mail = new TikiMail();
$mail->setFrom($prefs['sender_email']);
$mail->setSubject($_REQUEST["emailsubject"]);
$mail->setCrlf("\n");
$url=str_replace('tiki-invite.php', 'tiki-invited.php', $_SERVER['SCRIPT_URI'])
.'?invite='.$id.'&email='.urlencode($m['email']);
$text=$_text;
$text=str_replace('{link}', $url, $text);
$text=str_replace('{email}', $m['email'], $text);
$text=str_replace('{firstname}', $m['firstname'], $text);
$text=str_replace('{lastname}', $m['lastname'], $text);
$mail->setText($text);
$mail->send(array($m['email']));
}
$smarty->assign('sentresult', true);
}
$smarty->assign('emails', $emails);
}