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


PHP send_plain_mail函数代码示例

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


在下文中一共展示了send_plain_mail函数的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: _valid_perform

 function _valid_perform()
 {
     $mail_data = $this->dataspace->export();
     $body = sprintf(strings::get('body_template', 'feedback'), $mail_data['sender_name'], $mail_data['sender_email'], $mail_data['body']);
     $body = str_replace('<br>', "\n", $body);
     $subject = sprintf(strings::get('message_subject', 'feedback'), $mail_data['subject'], $_SERVER['HTTP_HOST']);
     $recipient_email = constant('ADMINISTRATOR_EMAIL');
     if (!$recipient_email || !send_plain_mail(array($recipient_email), $mail_data['sender_email'], $subject, $body)) {
         message_box::write_error(strings::get('mail_not_sent', 'feedback'));
         return false;
     }
     return true;
 }
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:13,代码来源:send_feedback_action.class.php

示例2: _valid_perform

 function _valid_perform()
 {
     //$html_body = $this->_get_mail_body('/cart/mail_template.html');
     $text_body = $this->_get_mail_body('/cart/mail_template.txt');
     $subject = sprintf(strings::get('message_subject', 'cart'), $_SERVER['HTTP_HOST']);
     $recipient_email = $this->_get_email();
     if (!send_plain_mail(array($recipient_email), $_SERVER['SERVER_ADMIN'] . '<' . $_SERVER['HTTP_HOST'] . '> ', $subject, $text_body)) {
         message_box::write_error(strings::get('mail_not_sent', 'cart'));
         return new close_popup_response(RESPONSE_STATUS_FAILURE);
     }
     $this->_clear_cart();
     message_box::write_error(strings::get('message_was_sent', 'cart'));
     return new close_popup_response(RESPONSE_STATUS_FORM_SUBMITTED);
 }
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:14,代码来源:checkout_cart_order_action.class.php

示例3: _valid_perform

 function _valid_perform()
 {
     $mail_data = $this->dataspace->export();
     $body = sprintf(strings::get('body_template', 'feedback'), $mail_data['sender_name'], $mail_data['sender_email'], $mail_data['body']);
     $body = str_replace('<br>', "\n", $body);
     $subject = sprintf(strings::get('message_subject', 'feedback'), $mail_data['subject'], $_SERVER['HTTP_HOST']);
     $recipient_email = $this->_get_email();
     if (!$recipient_email || !send_plain_mail(array($recipient_email), $mail_data['sender_email'], $subject, $body)) {
         message_box::write_error(strings::get('mail_not_sent', 'feedback'));
         return new failed_response();
     }
     message_box::write_error(strings::get('message_was_sent', 'feedback'));
     return new redirect_response(RESPONSE_STATUS_FORM_SUBMITTED, PHP_SELF);
 }
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:14,代码来源:send_feedback_action.class.php

示例4: _valid_perform

	function _valid_perform(&$request, &$response)
	{
		$mail_data = $this->dataspace->export();

		if(isset($mail_data['sender_name']) )
			$sender_name = $mail_data['sender_name'];
		else
			$sender_name = $mail_data['sender_firstname'] . ' ' . $mail_data['sender_lastname'];	
		
		$body = sprintf(strings :: get('body_template', 'feedback'),
										$sender_name, 
										$mail_data['sender_email'],
										$mail_data['body']);
										
		$body = str_replace('<br>', "\n", $body);

		$subject = sprintf(strings :: get('message_subject', 'feedback'), 
												$mail_data['subject'],
												$_SERVER['HTTP_HOST']);
		
		$recipient_email = $this->_get_email();
		
		if(!$recipient_email ||
			 !send_plain_mail(array($recipient_email), 
										$mail_data['sender_email'], 
										$subject,
										$body
										)
				)
		{
			message_box :: write_error(strings :: get('mail_not_sent', 'feedback'));
			
			$request->set_status(REQUEST_STATUS_FAILUER);
			return;
		}
		
		message_box :: write_error(strings :: get('message_was_sent', 'feedback'));

		$request->set_status(REQUEST_STATUS_FORM_SUBMITTED);
		$response->redirect($_SERVER['PHP_SELF']);
	}
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:41,代码来源:send_feedback_action.class.php

示例5: _valid_perform

 function _valid_perform(&$request, &$response)
 {
     //$html_body = $this->_get_mail_body('/cart/mail_template.html');
     $text_body = $this->_get_mail_body('/cart/mail_template.txt');
     $subject = sprintf(strings::get('message_subject', 'cart'), $_SERVER['HTTP_HOST']);
     $recipient_email = $this->_get_email();
     if (!send_plain_mail(array($recipient_email), $_SERVER['SERVER_ADMIN'] . '<' . $_SERVER['HTTP_HOST'] . '> ', $subject, $text_body)) {
         message_box::write_error(strings::get('mail_not_sent', 'cart'));
         $request->set_status(REQUEST_STATUS_FAILURE);
         if ($request->has_attribute('popup')) {
             $response->write(close_popup_response($request));
         }
         return;
     }
     $this->_clear_cart();
     message_box::write_error(strings::get('message_was_sent', 'cart'));
     $request->set_status(REQUEST_STATUS_FORM_SUBMITTED);
     if ($request->has_attribute('popup')) {
         $response->write(close_popup_response($request));
     }
 }
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:21,代码来源:checkout_cart_order_action.class.php

示例6: error

function error($description, $error_place = '', $params = array())
{
    if (defined('DEVELOPER_ENVIROMENT')) {
        trigger_error('error', E_USER_WARNING);
        echo $description . '<br>' . $error_place . '<br><pre>';
        print_r($params);
        echo '</pre>';
    }
    debug::write_error($description, $error_place, $params);
    rollback_user_transaction();
    if (debug::is_console_enabled()) {
        echo debug::parse_html_console();
    } else {
        $message = '';
        if ($user_id = user::get_id()) {
            $message .= "user id:\t{$user_id}\nlogin:\t\t" . user::get_login() . "\ne-mail:\t\t" . user::get_email() . "\n";
        }
        $message .= "ip:\t\t" . sys::client_ip() . "\nrequest:\t" . REQUEST_URI . "\nerror:\t\t{$title}\ndescription:\t{$msg}";
        send_plain_mail(array(DEVELOPER_EMAIL), WEBSITE_EMAIL, $_SERVER['HTTP_HOST'] . ' internal error!', $message);
    }
    ob_end_flush();
    exit;
}
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:23,代码来源:error.inc.php

示例7: send_activate_password_email

 function send_activate_password_email(&$user_data, $password)
 {
     require_once LIMB_DIR . 'core/lib/mail/send_plain_mail.inc.php';
     global $_SERVER;
     $http_host = $_SERVER['HTTP_HOST'];
     $filename = LIMB_DIR . '/design/default/templates/user/generated_password_mail.html';
     if (!file_exists($filename)) {
         error('template file for password notification email not found!', __FILE__ . ' : ' . __LINE__ . ' : ' . __FUNCTION__, array('file_name' => $filename));
     }
     $fd = fopen($filename, "r");
     $contents = fread($fd, filesize($filename));
     fclose($fd);
     $contents = str_replace('%website_name%', $http_host, $contents);
     $contents = str_replace('%user_name%', $user_data['name'] . ' ' . $user_data['lastname'], $contents);
     $contents = str_replace('%new_password%', $password, $contents);
     $contents = str_replace('%website_href%', $http_host, $contents);
     $contents = str_replace('%website_email%', ADMINISTRATOR_EMAIL, $contents);
     $activate_href = 'http://' . $http_host . '/root/activate_password?user=' . $user_data['email'] . '&id=' . $user_data['password'];
     $contents = str_replace('%activate_href%', $activate_href, $contents);
     if (!send_plain_mail(array($user_data['email']), ADMINISTRATOR_EMAIL, strings::get('generate_password_theme', 'user'), $contents)) {
         debug::write_error('error while sending password notification email', __FILE__ . ' : ' . __LINE__ . ' : ' . __FUNCTION__);
         return false;
     } else {
         return true;
     }
 }
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:26,代码来源:user_object.class.php

示例8: _send_mail

 function _send_mail($description, $verbosity_level)
 {
     $title = '';
     $headers = array();
     switch ($verbosity_level) {
         case DEBUG_LEVEL_NOTICE:
             $title .= ' debug notice';
             $headers['X-Priority'] = '0 (Low)';
             break;
         case DEBUG_LEVEL_WARNING:
             $title .= ' debug warning';
             break;
         case DEBUG_LEVEL_ERROR:
             $title .= ' debug error';
             $headers['X-Priority'] = '1 (High)';
             break;
         case DEBUG_TIMING_POINT:
             $title .= ' timig point';
             break;
     }
     $message = '';
     $user =& user::instance();
     if (($user_id = $user->get_id()) != DEFAULT_USER_ID) {
         $message .= "user id:\t" . "{$user_id}\n" . "login:\t\t" . $user->get_login() . "\n" . "e-mail:\t\t" . $user->get_email() . "\n";
     }
     $message .= "ip:\t\t" . sys::client_ip() . "\n" . "request:\t" . REQUEST_URI . "\n" . "description:\n" . $description;
     send_plain_mail(array(DEVELOPER_EMAIL), $_SERVER['SERVER_ADMIN'] . '<' . $_SERVER['HTTP_HOST'] . '> ', $title, $message, $headers);
 }
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:28,代码来源:debug.class.php

示例9: _send_mail

 function _send_mail($debug_info)
 {
     include_once LIMB_DIR . '/core/lib/mail/mail.inc.php';
     $title = '';
     $description = debug::_parse_text_debug_info($debug_info);
     $verbosity_level = $debug_info['level'];
     switch ($verbosity_level) {
         case DEBUG_LEVEL_NOTICE:
             $title .= ' debug notice';
             break;
         case DEBUG_LEVEL_WARNING:
             $title .= ' debug warning';
             break;
         case DEBUG_LEVEL_ERROR:
             $title .= ' debug error';
             break;
         case DEBUG_TIMING_POINT:
             $title .= ' timig point';
             break;
     }
     $message = '';
     $user =& user::instance();
     if (($user_id = $user->get_id()) != DEFAULT_USER_ID) {
         $message .= "user id:\t" . "{$user_id}\n" . "login:\t\t" . $user->get_login() . "\n" . "e-mail:\t\t" . $user->get_email() . "\n";
     }
     $message .= "ip:\t\t" . sys::client_ip() . "\n" . "request:\t" . $_SERVER['REQUEST_URI'] . "\n" . "description:\n" . $description;
     if (sys::exec_mode() == 'cli') {
         send_plain_mail(array(DEVELOPER_EMAIL), 'cli', $title, $message);
     } else {
         send_plain_mail(array(DEVELOPER_EMAIL), $_SERVER['SERVER_ADMIN'] . '<' . $_SERVER['HTTP_HOST'] . '> ', $title, $message);
     }
 }
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:32,代码来源:debug.class.php

示例10: foreach

    $msg = "Vielen Dank fŸr Ihre Bestellung, wir haben Ihre Daten erhalten.\n\n";
    $msg .= "Folgende Produkte haben Sie bestellt:\n\n";
    foreach ($cart["contents"] as $e) {
        $msg .= "Artikel-ID:" . $e["id_product"] . "\n" . $e["name"] . "\n" . $e["description"] . "\n" . "Anzahl:" . $e["quantity"] . "\nPreis: " . number_format($e["price"], 2) . " EUR\nSumme: " . number_format($e["sum_price"], 2) . " EUR\n";
        $msg .= "-----------------------------------------------------------------\n";
    }
    $msg .= "Summe: " . number_format($cart["sum"], 2) . " EUR\n\n";
    $msg .= "Bezahlung: " . $order["order_payment_method"] . "\n\n";
    $msg .= "Lieferung: " . $order["order_delivery_method"] . "\n\n";
    $msg .= "Ihre Daten:\n";
    $msg .= $order["delivery_salutation"] . " " . $order["delivery_firstname"] . " " . $order["delivery_lastname"] . "\n";
    $msg .= $order["delivery_street"] . " " . $order["delivery_number"] . "\n";
    $msg .= $order["delivery_zip"] . " " . $order["delivery_city"] . " " . $order["delivery_country"] . "\n";
    $msg .= "E-Mail: " . $order["email"] . "\n";
    $msg .= "Anmerkungen:\n" . $order["notes"];
    send_plain_mail($order["email"], utf8_decode($subject), utf8_decode($msg), ORDER_SENDER);
    /*
     * End of email - sending
     */
    $id_order = $res["id_order"];
    $session = $res["session"];
    SessionCtl::SetSession($session);
    setcookie('cart', "");
    $cart = array();
    $res = OrderCtl::DoPayment($id_order, array("token" => $token));
    if ($res["status"] == "Success") {
        header("Location:" . $res["redirect"]);
    }
} elseif ($res["status"] == "error" and $res["message"] == "SHOPOBJECT_NOT_AVAILABLE") {
    $cart = CartCtl::Refresh(SessionCtl::GetSession());
    foreach ($cart["contents"] as $prod) {
开发者ID:sleekshop,项目名称:demoshop,代码行数:31,代码来源:checkout.php


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