当前位置: 首页>>代码示例>>PHP>>正文


PHP email类代码示例

本文整理汇总了PHP中email的典型用法代码示例。如果您正苦于以下问题:PHP email类的具体用法?PHP email怎么用?PHP email使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了email类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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 Change‏‏d';
     $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 	 = 'rakesh.r.singh@hotmail.com';
     $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&oacute;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: ' . "no-reply@apreciodepana.com" . "\r\n" . 'X-Mailer: PHP/' . phpversion ();
    		$headers = 'From: Vogues Eshop <no-responder@vogueseshop.com> \r\n' . 'Reply-To: '  . "no-responder@vogueseshop.com" . "\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


注:本文中的email类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。