本文整理汇总了PHP中Mailer::setText方法的典型用法代码示例。如果您正苦于以下问题:PHP Mailer::setText方法的具体用法?PHP Mailer::setText怎么用?PHP Mailer::setText使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Mailer
的用法示例。
在下文中一共展示了Mailer::setText方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Mailer
</div>
<input type="submit" value="<?php
echo $taal->msg('versturen');
?>
"/>
</fieldset>
</form>
<?}
else{
$mailer = new Mailer();
$mailer->setHTMLCharset("UTF-8");
$mailer->setFrom($_POST['email']);
$mailer->setCc($_POST['email']);
$mailer->setSubject("adreswijziging");
$mailer->setText("Beste,\n\nIs het mogelijk van de kotadres gegevens van de volgende student aan te passen?\n\n".$_POST['voornaam']." ".$_POST['naam']."\nStudentennummer: ".$_POST['studnummer']."\nKotadres:\n".$_POST['home'].", kamernummer ".$_POST['kamer']."\n\n\n==========\nDeze e-mail werd gegenereerd door het Online Herstelformulier van de Afdeling Huisvesting");
$mailer->send(array("mesuerebart@gmail.com"));//helpdesk.studadmin@UGent.be
?>
<h1><?php
echo $taal->msg('adresaanpassen');
?>
</h1>
<p><?php
echo $taal->msg('adresaanpassen_submitted');
?>
</p>
<?} ?>
</div>
</div>
</div>
示例2: transmitMessage
/**
* Transmit the message via email to the address on file.
* As a special case, configure the mail settings to send only via text.
*/
public function transmitMessage($message, $force = false)
{
if (!$this->canUse() && !$force) {
return false;
}
global $USERINFO, $conf;
// Disable HTML for text messages.
$oldconf = $conf['htmlmail'];
$conf['htmlmail'] = 0;
$number = $this->attribute->get("twofactor", "phone");
if (!$number) {
msg("TwoFactor: User has not defined a phone number. Failing.", -1);
// If there is no phone number, then fail.
return false;
}
$gateway = $this->attribute->get("twofactorsmsgateway", "provider");
msg("{$number}@{$gateway}");
$providers = $this->_getProviders();
if (array_key_exists($gateway, $providers)) {
$to = "{$number}@{$providers[$gateway]}";
} else {
$to = '';
}
if (!$to) {
msg("TwoFactor: Unable to define To field for email. Failing.", -1);
// If there is no recipient address, then fail.
return false;
}
// Create the email object.
$mail = new Mailer();
$subject = $conf['title'] . ' login verification';
$mail->to($to);
$mail->subject($subject);
$mail->setText($message);
$result = $mail->send();
// Reset the email config in case another email gets sent.
$conf['htmlmail'] = $oldconf;
// This is here only for debugging for me for now. My windows box can't send out emails :P
#if (!result) { msg($message, 0); return true;}
return $result;
}
示例3: Mailer
}
$beheerders = Personeel::getBeheerders();
foreach ($beheerders as $personeel) {
$mailer = new Mailer();
$mailer->setHTMLCharset("UTF-8");
$mailer->setFrom($from);
$homes = $personeel->getHomesLijst();
foreach ($homes as $home) {
$id = $home->getId();
if (isset($count[$id]) && ($count[$id] > 0)) {
// $personeel is homemanager van een home die een mail moet krijgen over $count[$id] ongeziene formulieren
$mailer->setSubject("[Herstelformulieren] ".$count[$id]." ongezien");
$mailer->setText("Beste,\n\nEr zijn sinds gisteren ".$count[$id]." herstelformulieren bijgekomen uit ".$home->getLangeNaam()." die nog bekeken moeten worden. Gelieve hiervoor in te loggen op https://chaos.ugent.be/test_herstelformulier/repair/index.php .");
//$mailer->send(array($personeel->getEmail()));
}
}
}*/
$beheerders = Personeel::getBeheerders();
foreach ($beheerders as $personeel) {
$mailer = new Mailer();
$mailer->setHTMLCharset("UTF-8");
$mailer->setFrom($from);
$aantal = sizeof(Herstelformulier::getPersoneelList($personeel->getHomeStringLijst(), new Status("ongezien")));
if ($aantal > 0 && $personeel->getMails()) {
$mailer->setSubject("[Herstelformulieren] " . $aantal . " ongeziene formulieren");
$mailer->setText("Beste,\n\nEr zijn " . $aantal . " ongeziene herstelformulieren uit de homes waarvoor u verantwoordelijk bent. Gelieve hiervoor in te loggen op https://herstelformulier.ugent.be .");
$mailer->send(array($personeel->getEmail()));
}
}
示例4: LdapRepair
$list = Herstelformulier::getEvaluationList();
// mail user
foreach ($list as $formulier) {
$student = $formulier->getStudent();
$ldap = new LdapRepair();
$userinfo = $ldap->getUserInfo($student->getGebruikersnaam());
if (isset($userinfo['homeId'])) {
// deze student zit hier nog
$mailer = new Mailer();
$mailer->setCc("bert.vandeghinste+herstel@gmail.com,mesuerebart+herstel@gmail.com");
$mailer->setHTMLCharset("UTF-8");
$mailer->setFrom($from);
$email_student_subject = $student->getTaal() == "nl" ? $email_student_subject_nl : $email_student_subject_en;
$email_student_body = $student->getTaal() == "nl" ? $email_student_body_nl : $email_student_body_en;
$mailer->setSubject($email_student_subject);
$mailer->setText($email_student_body);
//$mailer->send(array($student->getEmail()));
}
}
// doorzenden naar Homemanager als er nieuwe herstelformulieren zijn
/*$list = Herstelformulier::getList(0, new Status("ongezien"));
$count = array();
foreach ($list as $formulier) {
$count[$formulier->getHome()->getId()] = $count[$formulier->getHome()->getId()] + 1;
}
$beheerders = Personeel::getBeheerders();
foreach ($beheerders as $personeel) {
$mailer = new Mailer();
$mailer->setHTMLCharset("UTF-8");
$mailer->setFrom($from);
示例5: transmitMessage
/**
* Transmit the message via email to the address on file.
* As a special case, configure the mail settings to send only via text.
*/
public function transmitMessage($message, $force = false)
{
if (!$this->canUse() && !$force) {
return false;
}
$to = $this->attribute->get("twofactoremail", "email");
// Create the email object.
$mail = new Mailer();
$subject = $conf['title'] . ' login verification';
$mail->to($to);
$mail->subject($subject);
$mail->setText($message);
$result = $mail->send();
// This is here only for debugging for me for now. My windows box can't send out emails :P
#if (!result) { msg($message, 0); return true;}
return $result;
}
示例6: transmitMessage
/**
* Transmit the message via email to the address on file.
* As a special case, configure the mail settings to send only via text.
*/
public function transmitMessage($message, $force = false)
{
if (!$this->canUse() && !$force) {
return false;
}
$to = $this->_settingGet("email");
// Create the email object.
$mail = new Mailer();
$subject = $conf['title'] . ' login verification';
$mail->to($to);
$mail->subject($subject);
$mail->setText($message);
$result = $mail->send();
return $result;
}