本文整理汇总了PHP中email类的典型用法代码示例。如果您正苦于以下问题:PHP email类的具体用法?PHP email怎么用?PHP email使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了email类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: envoyer
/**
* Methode : page envoyer le mailing
*/
public function envoyer()
{
if ($_POST) {
$texte = $this->input->post('texte');
$format = $this->input->post('format');
$sujet = $this->input->post('sujet');
$format = $format == 1 ? TRUE : FALSE;
$users = $this->user->select();
$nbr_envois = 0;
foreach ($users as $user) {
if ($format) {
$view = new View('mailing/template');
$view->name = ucfirst(mb_strtolower($user->username));
$view->content = $texte;
$message = $view->render();
} else {
$message = $texte;
}
if (email::send($user->email, Kohana::config('email.from'), $sujet, $message, $format)) {
$nbr_envois++;
}
}
return url::redirect('mailing?msg=' . urlencode(Kohana::lang('mailing.send_valide', number_format($nbr_envois))));
} else {
return parent::redirect_erreur('mailing');
}
}
开发者ID:ezioms,项目名称:RpgEditor,代码行数:30,代码来源:mailing.php
示例2: send_email
/** Send en bestemt artikkel på e-post */
protected function send_email($row)
{
$this->email->text('Hei,
Siden du ikke lengre er med i avisfirmaet "' . $row['ff_name'] . '" har din artikkel blitt slettet fordi den ikke tilhørte noen utgivelse. I tilfelle du kanskje ønsker å beholde teksten fra artikkelen, sender vi den på e-post.
Avisfirma: ' . $row['ff_name'] . ' <' . ess::$s['path'] . '/ff/?ff_id=' . $row['ff_id'] . '>
Tittel: ' . $row['ffna_title'] . '
Opprettet: ' . ess::$b->date->get($row['ffna_created_time'])->format(date::FORMAT_SEC) . ($row['ffna_updated_time'] ? '
Sist oppdatert: ' . ess::$b->date->get($row['ffna_updated_time'])->format(date::FORMAT_SEC) : '') . ($row['ffna_published'] ? '
Publisert: ' . ess::$b->date->get($row['ffna_published_time'])->format(date::FORMAT_SEC) : '') . '
Pris: ' . game::format_cash($row['ffna_price']) . '
Innhold:
-- START --
' . $row['ffna_text'] . '
-- SLUTT --
--
Kofradia.no
Denne e-posten er sendt til ' . $row['u_email'] . ' som ' . ($row['up_access_level'] == 0 ? 'tidligere tilhørte' : 'tilhører') . ' ' . $row['up_name'] . '
' . ess::$s['path']);
$this->email->format();
mailer::add_emails($this->email, $row['u_email'], "Din tidligere artikkel: {$row['ffna_title']} - Kofradia", true);
putlog("CREWCHAN", "AVISARTIKKEL SLETTET: E-post planlagt for utsendelse. %c4Mailer scriptet må kjøres!");
}
开发者ID:Kuzat,项目名称:kofradia,代码行数:29,代码来源:class.avis_slett_artikler.php
示例3: ListUpdatedSendMessages
public static function ListUpdatedSendMessages()
{
$tweetprivate = new tweet();
$tweetprivate->sendWatchlistUpdate();
$updateEmail = new email(email::ADDRESSES_ALL_CHOSEN);
$updateEmail->sendWatchlistUpdate();
}
开发者ID:patfeldman,项目名称:TechBounce,代码行数:7,代码来源:comms.class.php
示例4: deleteSubscriber
/**
* @param \CentralNews\Service\Subscriber|email $subscriber
* @param \CentralNews\Entity\ISubscriberGroup $group
* @return bool
*/
public function deleteSubscriber($subscriber, ISubscriberGroup $group)
{
$email = $subscriber instanceof Subscriber ? $subscriber->getEmail() : $subscriber;
$param = array('group_id' => $group->getId(), 'subscriber_email' => $email);
$request = new Request('delete_subscriber', $param, '', '');
$response = $this->sendRequest($request);
return $response->isSuccess();
}
开发者ID:it-studio,项目名称:centralnews,代码行数:13,代码来源:SubscriberManager.php
示例5: send_password_link
public function send_password_link($user, $key)
{
$message = file_get_contents("../extra/reset_password.txt");
$replace = array("FULLNAME" => $user["fullname"], "HOSTNAME" => $_SERVER["SERVER_NAME"], "KEY" => $key);
$email = new email("Reset password at " . $_SERVER["SERVER_NAME"], $this->settings->webmaster_email);
$email->set_message_fields($replace);
$email->message($message);
$email->send($user["email"], $user["fullname"]);
}
开发者ID:Wabuo,项目名称:monitor,代码行数:9,代码来源:password.php
示例6: sendEmailChangeMailAdmin
public function sendEmailChangeMailAdmin($newEmail)
{
$to = ADMIN_EMAIL;
$subject = 'AI Club - Email Changed';
$arrData['{EMAIL}'] = $newEmail;
$objEmail = new email();
$EmailBody = $objEmail->emailTemplate('member_email_changed_admin', $arrData);
$objEmail->sendmail($to, $subject, $EmailBody);
}
开发者ID:business-expert,项目名称:aiclubnew,代码行数:9,代码来源:profile_model.php
示例7: enviaremail
function enviaremail($para, $blank, $titulo, $texto)
{
global $email_from, $email_from_name, $email_smtp, $email_pass, $email_user, $email_auth, $email_debug, $email_replay;
if (strlen($email_from) == 0) {
echo '<H1>Erro #120#</h1>';
echo '<PRE>';
echo 'Parametros nao informados:
/* Dados do enviador */
$email_from = \'\'; /* e-mail do enviador / replay */
$email_from_name = \'\'; /* Nome do enviador */
/* Tipo de envio */
$email_auth = \'\'; /* ou AUTH ou MAIL */
/* Dados da conta do enviador - obrigatorio para AUTH */
$email_smtp = \'\'; /* servidor de SMTP */
$email_user = \'\'; /* usuario da conta do enviador */
$email_pass = \'\'; /* senha da conta do enviador */
';
echo '</pre>';
exit;
}
switch ($email_auth) {
case 'AUTH':
$mail = new email();
$mail->titulo = $titulo;
$mail->texto = $texto;
$mail->email = $email_from;
$mail->email_replay = $email_replay;
$mail->email_name = $email_from_name;
$mail->email_user = $email_user;
$mail->email_pass = $email_pass;
$mail->email_smtp = $email_smtp;
$mail->debug = round($email_debug);
$mail->to = $para;
$mail->method_2_mail();
break;
default:
$mail = new email();
$mail->titulo = $titulo;
$mail->texto = $texto;
$mail->email = $email_from;
$mail->email_replay = $email_replay;
$mail->email_name = $email_from_name;
$mail->email_user = $email_user;
$mail->email_pass = $email_pass;
$mail->email_smtp = $email_smtp;
$mail->debug = round($email_debug);
$mail->to = $para;
$mail->method_1_mail();
break;
}
}
开发者ID:bireme,项目名称:proethos,代码行数:54,代码来源:sisdoc_email.php
示例8: send
function send($affiliate_newsletter_id)
{
$mail_query = tep_db_query("select affiliate_firstname, affiliate_lastname, affiliate_email_address from " . TABLE_AFFILIATE . " where affiliate_newsletter = '1'");
$mimemessage = new email(array('X-Mailer: osCmax Mailer'));
$mimemessage->add_text($this->content);
$mimemessage->build_message();
while ($mail = tep_db_fetch_array($mail_query)) {
$mimemessage->send($mail['affiliate_firstname'] . ' ' . $mail['affiliate_lastname'], $mail['affiliate_email_address'], '', EMAIL_FROM, $this->title);
}
$affiliate_newsletter_id = tep_db_prepare_input($affiliate_newsletter_id);
tep_db_query("update " . TABLE_AFFILIATE_NEWSLETTERS . " set date_sent = now(), status = '1' where affiliate_newsletters_id = '" . tep_db_input($affiliate_newsletter_id) . "'");
}
开发者ID:digideskio,项目名称:oscmax2,代码行数:12,代码来源:affiliate_newsletter.php
示例9: sendPasswordChangedEmail1
public function sendPasswordChangedEmail1($row)
{
global $objComm, $DB;
$to = ADMIN_EMAIL;
$subject = 'AI Club - Password Changed';
$arrData['{NAME}'] = $row->fname;
$arrData['{EMAIL}'] = $row->email_address;
$arrData['{BIRTHDATE}'] = $row->birth_date;
$objEmail = new email();
$EmailBody = $objEmail->emailTemplate('new_password_changed', $arrData);
$objEmail->sendmail($to, $subject, $EmailBody);
}
开发者ID:business-expert,项目名称:aiclubnew,代码行数:12,代码来源:forgot_model.php
示例10: send
function send($newsletter_id)
{
$mail_query = smn_db_query("select customers_firstname, customers_lastname, customers_email_address from " . TABLE_CUSTOMERS . " where customers_newsletter = '1'");
$mimemessage = new email(array('X-Mailer: oscMall bulk mailer'));
$mimemessage->add_html($this->content);
$mimemessage->build_message();
while ($mail = smn_db_fetch_array($mail_query)) {
$mimemessage->send($mail['customers_firstname'] . ' ' . $mail['customers_lastname'], $mail['customers_email_address'], '', EMAIL_FROM, $this->title);
}
$newsletter_id = smn_db_prepare_input($newsletter_id);
smn_db_query("update " . TABLE_NEWSLETTERS . " set date_sent = now(), status = '1' where newsletters_id = '" . smn_db_input($newsletter_id) . "'");
}
开发者ID:stanislauslive,项目名称:StanMarket,代码行数:12,代码来源:newsletter.php
示例11: sendmail
public function sendmail()
{
$to = $this->row->email_address;
//$to = '[email protected]';
$subject = 'AI Club - Your Memeber account created successfully';
$arrData['{FIRST_NAME}'] = $this->row->fname;
$arrData['{EMAIL}'] = $this->row->email_address;
$arrData['{PASSWORD}'] = $_REQUEST['data_password'];
$arrData['{URL}'] = SITE_PATH . "/index.php";
$objEmail = new email();
$EmailBody = $objEmail->emailTemplate('member_login', $arrData);
$objEmail->sendmail($to, $subject, $EmailBody);
}
开发者ID:business-expert,项目名称:aiclubnew,代码行数:13,代码来源:verification_model.php
示例12: callback
public function callback($row)
{
$memObj = new \Memcached();
foreach ($row as $value) {
//更新缓存
$key = 'user_' . $value['uid'];
$memObj->set($key, json_encode($value));
//给用户发站内信等
$emailObj = new email();
$emailObj->send($value['uid']);
//.....
//anything
}
}
开发者ID:dormscript,项目名称:dataTransfer,代码行数:14,代码来源:user3.php
示例13: send
function send($newsletter_id)
{
$mail_query = tep_db_query("select customers_firstname, customers_lastname, customers_email_address from " . TABLE_CUSTOMERS . " where customers_newsletter = '1'");
while ($mail = tep_db_fetch_array($mail_query)) {
$mimemessage = new email(array('X-Mailer: osCommerce bulk mailer'));
// Préparation de l'envoie du mail en HTML
$mimemessage->add_html_newsletter($this->header . "\n\n" . $this->content . "\n\n" . $this->unsubscribea . " " . '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . FILENAME_UNSUBSCRIBE . "?email=" . $mail['customers_email_address'] . '">' . HTTP_SERVER . DIR_WS_CATALOG . FILENAME_UNSUBSCRIBE . "?email=" . $mail['customers_email_address'] . '</a>' . "\n\n" . $this->unsubscribeb);
$mimemessage->build_message();
// ################# END - Contribution Newsletter v050 ##############
$mimemessage->send($mail['customers_firstname'] . ' ' . $mail['customers_lastname'], $mail['customers_email_address'], '', EMAIL_FROM, $this->title);
}
$newsletter_id = tep_db_prepare_input($newsletter_id);
tep_db_query("update " . TABLE_NEWSLETTERS . " set date_sent = now(), status = '1' where newsletters_id = '" . tep_db_input($newsletter_id) . "'");
}
开发者ID:eosc,项目名称:EosC-2.3,代码行数:14,代码来源:newsletter.php
示例14: sendRespuesta
function sendRespuesta()
{
$destino = new usuario($_POST["usr_id"]);
$correo = new email();
$link_detalle = FULL_WEBPAGE . '/detalle.php?id=' . $_POST["pub_id"];
$link_respuesta = FULL_WEBPAGE . '/preguntas.php?tipo=2&publicacion=' . $_POST["pub_id"];
$links = array("detalle" => $link_detalle, "respuesta" => $link_respuesta);
$correo->sendRespuesta($destino->a_email, $links, $_POST['respuesta']);
/*
$cli = new usuario($_POST["usr_id"]);
$poster = new usuario($_POST["id_poster"]);
$publicacion = new publicaciones($_POST["pub_id"]);
ini_set("sendmail_from",$poster->a_email);
$email_to = "" . $cli-> a_email . "";
$email_subject = "Apreciodepana.com "." - ".$poster-> n_nombre." ".$poster->n_apellido." ha contestado tu pregunta!";
$email_message = "Sobre la publicacion: ".$publicacion -> titulo." \n\n ".$_POST['respuesta'];
$txt = '<!DOCTYPE html>
<html lang="es"><body>
<div style=" padding 20px; text-align:left; margin: 20px;">
<div style="width:500px;background:#fff; color:#666; padding:20px; margin-left:30px; margin-right:30px;">
<div style="text-align:left; padding-bottom:10px; border-bottom: 1px solid #CCC;"><img src="http://vogueseshop.com/galeria/img/logos/logo-header2.png"></div>
<br>';
$txt .= " <div style='text-align:left; margin-left:10px; font-size: 18px; '>
<p><b>Te han respondido!</b></p>
<p>Te respondieron una pregunta sobre la siguiente publicación</p>
<a style='text-decoration:none;'><p>$link_detalle</p><a>
</div>
<br>
<div style='text-align:left; padding-bottom:10px; border-bottom: 1px solid #ccc;' >
<a href=$link_respuesta style='text-decoration:none;'>
<button style='background:#36A7E1;
text-align:center; color:#FFF; padding:10px; margin:10px; border: 1px solid #1e8dc6; cursor: pointer; font-size: 18px;'>Ver Respuesta</button>
</a> ";
$txt .= '<br></div><div style="font-size: 12px; text-align:left; margin-left:10px; color:#999; margin-top:5px;">
Vistete a la moda con la mejor tecnologia </div></div></div></body></html>';
//$headers = 'From: Apreciodepana.com ' . "\r\n" . 'Reply-To: ' . "[email protected]" . "\r\n" . 'X-Mailer: PHP/' . phpversion ();
$headers = 'From: Vogues Eshop <[email protected]> \r\n' . 'Reply-To: ' . "[email protected]" . "\r\n" . 'X-Mailer: PHP/' . phpversion ()." MIME-Version: 1.0\r\n"." Content-type: text/html; charset=UTF-8.";
mail ( $email_to, 'vogueseshop.com', $txt, $headers );
//echo json_encode(array("estado"=>"OK"));
echo json_encode(array("correo a enviar"=>$cli-> a_email, "correo from"=>$poster->a_email,"header"=>$headers,"subject"=>$email_subject,"message"=>$email_message));
*
*/
}
开发者ID:darwinv,项目名称:vogues,代码行数:50,代码来源:f_pregunta.php
示例15: index
/**
* The index method is the default method called when you access this controller, so we can use this
* to run the scheduled tasks. Takes an optional URL parameter "tasks", which is a comma separated list of
* the module names to schedule, plus can contain "notifications" to fire the built in notifications system or
* "all_modules" to fire every module that declares a scheduled task plugin.
* If tasks are not specified then everything is run.
*/
public function index()
{
$tm = microtime(true);
$this->db = new Database();
$system = new System_Model();
if (isset($_GET['tasks'])) {
$tasks = explode(',', $_GET['tasks']);
} else {
$tasks = array('notifications', 'all_modules');
}
// grab the time before we start, so there is no chance of a record coming in while we run that is missed.
$currentTime = time();
if (in_array('notifications', $tasks)) {
$this->last_run_date = $system->getLastScheduledTaskCheck();
$this->checkTriggers();
}
$tmtask = microtime(true) - $tm;
if ($tmtask > 5) {
self::msg("Triggers & notifications scheduled task took {$tmtask} seconds.", 'alert');
}
$this->runScheduledPlugins($system, $tasks);
if (in_array('notifications', $tasks)) {
$swift = email::connect();
$this->doRecordOwnerNotifications($swift);
$this->doDigestNotifications($swift);
}
// mark the time of the last scheduled task check, so we can get diffs next time
$this->db->update('system', array('last_scheduled_task_check' => "'" . date('c', $currentTime) . "'"), array('id' => 1));
self::msg("Ok!");
$tm = microtime(true) - $tm;
if ($tm > 30) {
self::msg("Scheduled tasks for " . implode(', ', $tasks) . " took {$tm} seconds.", 'alert');
}
}
开发者ID:BirenRathod,项目名称:indicia-code,代码行数:41,代码来源:scheduled_tasks.php
示例16: check_reorder_level
public function check_reorder_level()
{
global $db;
global $auth_session;
$domain_id = domain_id::get($this->domain_id);
//sellect qty and reorder level
$inventory = new product();
$sth = $inventory->select_all('count');
$inventory_all = $sth->fetchAll(PDO::FETCH_ASSOC);
$email = "";
foreach ($inventory_all as $row) {
if ($row['quantity'] <= $row['reorder_level']) {
$message = "The quantity of Product: " . $row['description'] . " is " . siLocal::number($row['quantity']) . ", which is equal to or below its reorder level of " . $row['reorder_level'];
$return['row_' . $row['id']]['message'] = $message;
$email_message .= $message . "<br />\n";
}
}
//print_r($return);
#$attachment = file_get_contents('./tmp/cache/' . $pdf_file_name);
$email = new email();
$email->notes = $email_message;
$email->from = $email->get_admin_email();
$email->to = $email->get_admin_email();
#$email -> bcc = "justin@localhost";
$email->subject = "Simple Invoices reorder level email";
$email->send();
return $return;
}
开发者ID:alachaum,项目名称:simpleinvoices,代码行数:28,代码来源:inventory.php
示例17: _send_email_alert
/**
* Sends an email alert
*/
public static function _send_email_alert($post)
{
// Email Alerts, Confirmation Code
$alert_email = $post->alert_email;
$alert_lon = $post->alert_lon;
$alert_lat = $post->alert_lat;
$alert_radius = $post->alert_radius;
$alert_code = text::random('alnum', 20);
$settings = kohana::config('settings');
$to = $alert_email;
$from = array();
$from[] = $settings['alerts_email'] ? $settings['alerts_email'] : $settings['site_email'];
$from[] = $settings['site_name'];
$subject = $settings['site_name'] . " " . Kohana::lang('alerts.verification_email_subject');
$message = Kohana::lang('alerts.confirm_request') . url::site() . 'alerts/verify?c=' . $alert_code . "&e=" . $alert_email;
if (email::send($to, $from, $subject, $message, TRUE) == 1) {
$alert = ORM::factory('alert');
$alert->alert_type = self::EMAIL_ALERT;
$alert->alert_recipient = $alert_email;
$alert->alert_code = $alert_code;
$alert->alert_lon = $alert_lon;
$alert->alert_lat = $alert_lat;
$alert->alert_radius = $alert_radius;
if (isset($_SESSION['auth_user'])) {
$alert->user_id = $_SESSION['auth_user']->id;
}
$alert->save();
self::_add_categories($alert, $post);
return TRUE;
}
return FALSE;
}
开发者ID:rabbit09,项目名称:Taarifa_Web,代码行数:35,代码来源:alert.php
示例18: notify_admins
public function notify_admins($subject = NULL, $message = NULL)
{
// Don't show the exceptions for this operation to the user. Log them
// instead
try {
if ($subject && $message) {
$settings = kohana::config('settings');
$from = array();
$from[] = $settings['site_email'];
$from[] = $settings['site_name'];
$users = ORM::factory('user')->where('notify', 1)->find_all();
foreach ($users as $user) {
if ($user->has(ORM::factory('role', 'admin'))) {
$address = $user->email;
$message .= "\n\n\n\n~~~~~~~~~~~~\n" . Kohana::lang('notifications.admin_footer') . "\n" . url::base() . "\n\n" . Kohana::lang('notifications.admin_login_url') . "\n" . url::base() . "admin";
if (!email::send($address, $from, $subject, $message, FALSE)) {
Kohana::log('error', "email to {$address} could not be sent");
}
}
}
} else {
Kohana::log('error', "email to {$address} could not be sent\n\t\t\t\t - Missing Subject or Message");
}
} catch (Exception $e) {
Kohana::log('error', "An exception occured " . $e->__toString());
}
}
开发者ID:kjgarza,项目名称:ushahidi,代码行数:27,代码来源:notifications.php
示例19: forgotpassword
public function forgotpassword($data)
{
try {
$db = new db_core();
$token = $this->getToken('users', 'recoverToken');
$where['email'] = $data->email;
$in['recoverToken'] = $token;
$info = $db->reg_one("SELECT nombre FROM users WHERE email='" . $data->email . "'");
$db->update('users', $in, $where);
$email = new email();
$email->forgotmail($data->email, $token, $info[0]);
$this->returnData(array("status" => 0));
} catch (Exception $e) {
$this->returnData(array("status" => 1));
}
}
开发者ID:acalvoa,项目名称:EOLLICE,代码行数:16,代码来源:user.php
示例20: getInstance
/**
* Méthode qui crée l'unique instance de la classe
* si elle n'existe pas encore puis la retourne.
*
* @param void
* @return Singleton
*/
public static function getInstance()
{
if (is_null(self::$_instance)) {
self::$_instance = new email();
}
return self::$_instance;
}
开发者ID:JSEvents,项目名称:DoodleLike,代码行数:14,代码来源:email.class.php
注:本文中的email类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论