本文整理汇总了PHP中Email::AddAddress方法的典型用法代码示例。如果您正苦于以下问题:PHP Email::AddAddress方法的具体用法?PHP Email::AddAddress怎么用?PHP Email::AddAddress使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Email
的用法示例。
在下文中一共展示了Email::AddAddress方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Email
'GiftSendCity' => $city,
'GiftSendState' => $state,
'GiftSendZip' => $zip,
'GiftSendEmail' => $email,
'PromoCodeID' => $PromoCodeID,
);
$dbi->insert('GiftCertificates', $insert_data);
//this gets used on the success page
$_SESSION['Gift'] = $insert_data;
$_SESSION['Gift']['GiftPaidAmount'] = $transaction->amounts['total']->formatted;
$_SESSION['Gift']['GiftSendMethod'] = $sendMethod;
$email = new Email();
$email->AddAddress($krustomer->Email);
//$email->AddBCC('bjorgensen@sydcon.com');
$email->AddBCC('smityas@att.net');
$email->Subject = 'Gift Certificate Purchase';
$text = $dbi->q_1("SELECT Body FROM WebPages WHERE alias = 'success2'")->Body;
$body = <<<EOT
<p>$text</p>
<table>
<tbody>
<tr>
<td>
Recipient First Name:
</td>
<td>
示例2: strtolower
<?php
/**
* Handles password resetting
*/
require 'includes/global.inc.php';
//debug(1, 1, 1);
$page = Page::get_from_alias('forgot');
if ($_REQUEST['forgot-email']) {
$email = strtolower($_POST['forgot-email']);
if ($krustomer = Customer::get_from_email($email)) {
// email found
$status = 1;
$mail = new Email();
$mail->AddAddress($krustomer->Email, $krustomer->full_name);
$mail->Subject = 'Madison & Rayne Password Reset';
// Creates a reset token
$reset_token = Customer::create_reset_token($krustomer->Email);
$insert_array = array('CustomerID' => $krustomer->CustomerID, 'token_id' => $reset_token, 'expires' => date("Y-m-d H:i:s", time() + 60 * 60));
dbi()->insert('password_reset_requests', $insert_array);
$mail->MsgHTML("<p>We have received a request to reset the password for your Madison & Rayne account.\n If you did not request that your password be reset, you can ignore this email.</p>\n <p>To reset your password, please click on the link below. Simply enter a new password\n of your choice. You will have one hour to reset your password before the link will no longer work.</p>\n <p>If you have any questions, please contact us at\n <a href='mailto:info@madisonandrayne.com'>info@madisonandrayne.com</a> or 1-855-626-3701. Thank you!</p>\n <p><a href='" . SITE_URL . "/forgot?token_id=" . $reset_token . "'>" . SITE_URL . "/forgot?token_id=" . $reset_token . "</a></p>");
$mail->Send();
Gadget::add_message('An email has been sent to you with a link to reset your password.');
Gadget::redirect('index');
die;
} else {
// no email found
Gadget::add_message('That email address was not found.');
}
} elseif (isset($_REQUEST['token_id'])) {
$_REQUEST = clean_input($_REQUEST);
示例3: validate_form
$errors[] = 'no email address provided';
} elseif (!preg_match('/^[A-Z0-9._%+-]+\\@[A-Z0-9.-]+\\.[A-Z]{2,4}(\\.[A-Z]{2,4})?$/i', $email_addr)) {
$errors[] = 'invalid email address';
}
if (!$message) {
$errors[] = 'no message provided';
}
if ($errors) {
Gadget::add_message(implode(', ', $errors));
} else {
$insert_data = array('Email' => $email_addr, 'Message' => $message);
$dbi->insert('Contact', $insert_data);
//$to_address = 'bjorgensen@sydcon.com';
$to_address = 'madisonandrayne2012@gmail.com';
$email = new Email(true);
$email->AddAddress($to_address);
$email->Subject = 'Contact Us Submission';
$body = '<p>The following message was submitted from the Contact Us form by ' . $email_addr . ':</p>' . htmlspecialchars($message);
$email->MsgHTML($body);
$email->Send();
Gadget::add_message('Your message has been submitted.');
}
}
$js = <<<EOT
function validate_form(){
if(!\$('#contact-email').val()){
alert('Please enter an email address.');
return false;
}
if(!checkEmail(\$('#contact-email').val())){
alert('Please enter a valid email address.');
示例4: Email
HypoVereinsbank <br/>
Kto: 388008148<br/>
BLZ: 86020086<br/>
Verwendungszweck: Thaikurs DD und dein…. Name<br/>
<br/>
Der Restbetrage in Höhe von 185 € ist zu Beginn des Kurses fällig.<br/>
Fragen beantworten wir gern per mail und persönlich.<br/>
Anmeldung: Milam M. Horn, <br/> Email: spiritoflove@t-online.de, <br/>Tel.: 0175 86 57 233<br/>
';
$model->endText = 'Vielen Dank für Ihre Anmeldung';
// 1. to customer
$mail = new Email('subscribe');
$mail->AddAddress($model->email)->setSubject('Anmeldung zur Veranstaltung: Thaimassage')->setMsg($this->renderPartial('aiajaya.views.mail.subscribe_client', array('model' => $model), true, false))->setFrom('anmelden@balance-dresden.info', 'Anmeldung Balance Zentrum')->send();
// 2. to admin
$mail = new Email('subscribe');
$mail->AddAddress('spiritoflove@t-online.de')->setSubject('Anmeldung zur Veranstaltung: Thaimassage')->setMsg($this->renderPartial('aiajaya.views.mail.subscribe_admin', array('model' => $model), true, false))->setFrom('anmelden@balance-dresden.info', 'Anmeldung Balance Zentrum')->send();
}
}
if (!isset($_POST['SubscribeForm']) || $model->hasErrors()) {
?>
<p>
Erlerne die Kunst der Thaimassage Modul 1 (Basiskurs)<br/>
Seminar vom 29. November – 1. Dezember 2013,<br/>
Beginn: Freitag17 Uhr, Ende: Sonntag 17 Uhr <br/>
</p>
<div class="form">
<?php
$form = $this->beginWidget('CActiveForm');
?>
示例5: actionCreate
/**
* Creates a new comment.
*
* On Ajax request:
* on successfull creation comment/_view is rendered
* on error comment/_form is rendered
* On POST request:
* If creation is successful, the browser will be redirected to the
* url specified by POST value 'returnUrl'.
*/
public function actionCreate()
{
$comment = new Comment();
$cClass = get_class($comment);
if (isset($_POST[$cClass])) {
$comment->attributes = $_POST[$cClass];
$output = '';
$commentOutput = '';
$spam = $this->isSpam($comment);
if (!$spam && $this->saveComment($comment)) {
Yii::app()->user->setFlash('success', 'Erfolgreich Kommentar im Gästebuch eingetragen.');
$mail = new Email('admin');
$mail->AddAddress('carl.schoenbach@gmail.com')->setSubject('Gaestebuch Kommentar')->setMsg($this->renderPartial('email', array('comment' => $comment, 'page' => $comment->getBaseModel()), true))->setFrom('gaestebuch@balance-dresden.info', 'Gästebuch ' . Yii::app()->name);
$mail->send();
} else {
if ($spam) {
Yii::app()->user->setFlash('error', $spam);
} else {
Yii::app()->user->setFlash('error', 'Problem beim Speichern');
Yii::app()->user->setFlash('error', CHtml::errorSummary($comment));
}
}
}
$this->redirect($_POST['returnUrl']);
}
示例6: actionExport
public function actionExport()
{
$curMonth = date('n');
$curYear = date('Y');
if ($curMonth == 11) {
$firstDay2NextMonth = mktime(0, 0, 0, 0, 0, $curYear + 1);
} else {
if ($curMonth == 11) {
$firstDay2NextMonth = mktime(0, 0, 0, 0, 1, $curYear + 1);
} else {
$firstDay2NextMonth = mktime(0, 0, 0, $curMonth + 2, 1);
}
}
$criteria = new CDbCriteria(array('condition' => '`to`>' . (time() - 60 * 30), 'order' => '`from` ASC'));
$dataProviderAll = new CActiveDataProvider('Termin', array('pagination' => array('pageSize' => 9999), 'criteria' => $criteria));
$all_events = array();
foreach ($dataProviderAll->getData() as $m) {
$all_events[$m->id] = date('d.m.y', $m->from) . ' ' . $m->titel;
}
// now only get selected
if (isset($_POST['inc_events'])) {
$inc_events = array();
foreach ($_POST['inc_events'] as $v) {
$inc_events[] = (int) $v;
}
$criteria = new CDbCriteria(array('condition' => '`to`>' . (time() - 60 * 30) . ' AND `id` IN (' . implode(',', $inc_events) . ')', 'order' => '`from` ASC'));
} else {
$criteria = new CDbCriteria(array('condition' => '`to`>' . (time() - 60 * 30) . ' AND `from` < ' . $firstDay2NextMonth, 'order' => '`from` ASC'));
}
$dataProvider = new CActiveDataProvider('Termin', array('pagination' => array('pageSize' => 9999), 'criteria' => $criteria));
$inc_events = array();
foreach ($dataProvider->getData() as $m) {
$inc_events[] = $m->id;
}
$textModel = new TextModel();
if (isset($_POST['TextModel']) && isset($_POST['TextModel']['text'])) {
$textModel->text = $_POST['TextModel']['text'];
}
$subject = 'Newsletter- ' . strftime("%B", time());
$from = array('newsletter@balance-dresden.info', 'Newsletter');
$html = $this->renderPartial('export_mail', array('dataProvider' => $dataProvider, 'textModel' => $textModel), true, false);
$txt = $this->renderPartial('export_mail_txt', array('dataProvider' => $dataProvider, 'textModel' => $textModel), true, false);
if (isset($_POST['dowhat']) && $_POST['dowhat'] == 1) {
$mail = new Email('customer');
$mail->AddAddress('balrok.1787569@gmail.com')->setSubject($subject)->setMsg($html)->setTxtMsg($txt)->setFrom($from[0], $from[1])->send();
Yii::app()->user->setFlash('success', 'Erfolgreich an Carl gesendet.');
$this->redirect(array('export'));
}
if (isset($_POST['dowhat']) && ($_POST['dowhat'] == 2 || $_POST['dowhat'] == 3)) {
$adminEmails = [];
if (isset(Yii::app()->params['adminEmails'])) {
$adminEmails = Yii::app()->params['adminEmails'];
}
if (isset(Yii::app()->params['adminEmail'])) {
$adminEmails[] = Yii::app()->params['adminEmail'];
}
$mail = new Email('customer');
$mail->setSubject($subject);
$mail->setMsg($html);
$html = $mail->getMsgHtml();
$from[0] = $adminEmails[0];
$campaign = Yii::app()->mailchimp->createCampaign($subject, $from[0], $from[1], 'Newsletter', $html, $txt);
if ($campaign['status'] != "save") {
diedump($campaign);
}
$id = $campaign['id'];
if ($_POST['dowhat'] == 2) {
$result = Yii::app()->mailchimp->sendtestCampaign($id, $adminEmails);
dump($result);
}
if ($_POST['dowhat'] == 3) {
$result = Yii::app()->mailchimp->sendCampaign($id);
dump($result);
}
}
$this->render('export', array('dataProvider' => $dataProvider, 'all_events' => $all_events, 'inc_events' => $inc_events, 'textModel' => $textModel));
}