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


PHP Mail::setTitle方法代码示例

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


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

示例1: sendMailMessage

 /**
  * send email
  */
 function sendMailMessage($title, $message, $recipientName, $recipientEmailAddress, $senderName, $senderEmailAddress)
 {
     $oMail = new Mail();
     $oMail->setTitle($title);
     $oMail->setContent($message);
     $oMail->setSender($senderName, $senderEmailAddress);
     $oMail->setReceiptor($recipientName, $recipientEmailAddress);
     $oMail->send();
 }
开发者ID:kang85,项目名称:xe-module-notification,代码行数:12,代码来源:notification.controller.php

示例2: procCommunicationSendMessage

 /**
  * @brief 쪽지 발송
  **/
 function procCommunicationSendMessage()
 {
     // 로그인 정보 체크
     if (!Context::get('is_logged')) {
         return new Object(-1, 'msg_not_logged');
     }
     $logged_info = Context::get('logged_info');
     // 변수 검사
     $receiver_srl = Context::get('receiver_srl');
     if (!$receiver_srl) {
         return new Object(-1, 'msg_not_exists_member');
     }
     $title = trim(Context::get('title'));
     if (!$title) {
         return new Object(-1, 'msg_title_is_null');
     }
     $content = trim(Context::get('content'));
     if (!$content) {
         return new Object(-1, 'msg_content_is_null');
     }
     $send_mail = Context::get('send_mail');
     if ($send_mail != 'Y') {
         $send_mail = 'N';
     }
     // 받을 회원이 있는지에 대한 검사
     $oMemberModel =& getModel('member');
     $oCommunicationModel =& getModel('communication');
     $receiver_member_info = $oMemberModel->getMemberInfoByMemberSrl($receiver_srl);
     if ($receiver_member_info->member_srl != $receiver_srl) {
         return new Object(-1, 'msg_not_exists_member');
     }
     // 받을 회원의 쪽지 수신여부 검사 (최고관리자이면 패스)
     if ($logged_info->is_admin != 'Y') {
         if ($receiver_member_info->allow_message == 'F') {
             if (!$oCommunicationModel->isFriend($receiver_member_info->member_srl)) {
                 return new object(-1, 'msg_allow_message_to_friend');
             }
         } elseif ($receiver_member_info->allow_messge == 'N') {
             return new object(-1, 'msg_disallow_message');
         }
     }
     // 쪽지 발송
     $output = $this->sendMessage($logged_info->member_srl, $receiver_srl, $title, $content);
     // 메일로도 발송
     if ($output->toBool() && $send_mail == 'Y') {
         $view_url = Context::getRequestUri();
         $content = sprintf("%s<br /><br />From : <a href=\"%s\" target=\"_blank\">%s</a>", $content, $view_url, $view_url);
         $oMail = new Mail();
         $oMail->setTitle($title);
         $oMail->setContent($content);
         $oMail->setSender($logged_info->user_name, $logged_info->email_address);
         $oMail->setReceiptor($receiver_member_info->user_name, $receiver_member_info->email_address);
         $oMail->send();
     }
     return $output;
 }
开发者ID:hottaro,项目名称:xpressengine,代码行数:59,代码来源:communication.controller.php

示例3: sendMessages

	function sendMessages($content, $mail_content, $title, $sender, $config) 
	{
		$oTextmessageController = &getController('textmessage');
		$oPaynotyModel = &getModel('paynoty');

		if (in_array($config->sending_method,array('1','2'))&&$oTextmessageController) 
		{
			$args->recipient_no = explode(',',$config->admin_phones);
			//$args->sender_no = $receiver->recipient_no;
			$args->content = $content;
			$output = $oTextmessageController->sendMessage($args);
			if (!$output->toBool()) return $output;
		}

		if (in_array($config->sending_method,array('1','3'))) 
		{
			if ($config->sender_email)
			{
				$sender_email_address = $config->sender_email;
			}
			else
			{
				$sender_email_address = $sender->email_address;
			}
			if ($config->sender_name)
			{
				$sender_name = $config->sender_name;
			}
			else
			{
				$sender_name = $sender->nick_name;
			}
			$oMail = new Mail();
			$oMail->setTitle($title);
			$oMail->setContent($mail_content);
			$oMail->setSender($sender_name, $sender_email_address);
			$target_email = explode(',',$config->admin_emails);
			foreach ($target_email as $email_address) 
			{
				$email_address = trim($email_address);
				if (!$email_address) continue;
				$oMail->setReceiptor($email_address, $email_address);
				$oMail->send();
			}
		}
		return new Object();
	}
开发者ID:WEN2ER,项目名称:nurigo,代码行数:47,代码来源:paynoty.controller.php

示例4: importMember


//.........这里部分代码省略.........
         $obj->point = base64_decode($xmlObj->member->point->body);
         $obj->image_nickname = base64_decode($xmlObj->member->image_nickname->buff->body);
         $obj->image_mark = base64_decode($xmlObj->member->image_mark->buff->body);
         $obj->profile_image = base64_decode($xmlObj->member->profile_image->buff->body);
         $obj->signature = base64_decode($xmlObj->member->signature->body);
         $obj->regdate = base64_decode($xmlObj->member->regdate->body);
         $obj->last_login = base64_decode($xmlObj->member->last_login->body);
         if ($xmlObj->member->extra_vars) {
             foreach ($xmlObj->member->extra_vars as $key => $val) {
                 if (in_array($key, array('node_name', 'attrs', 'body'))) {
                     continue;
                 }
                 $obj->extra_vars->{$key} = base64_decode($val->body);
             }
         }
         // Create url for homepage and blog
         if ($obj->homepage && strncasecmp('http://', $obj->homepage, 7) !== 0 && strncasecmp('https://', $obj->homepage, 8) !== 0) {
             $obj->homepage = 'http://' . $obj->homepage;
         }
         // email address column
         $obj->email_address = $obj->email;
         list($obj->email_id, $obj->email_host) = explode('@', $obj->email);
         // Set the mailing option
         if ($obj->allow_mailing != 'Y') {
             $obj->allow_mailing = 'N';
         }
         // Set the message option
         $obj->allow_message = 'Y';
         if (!in_array($obj->allow_message, array('Y', 'N', 'F'))) {
             $obj->allow_message = 'Y';
         }
         // Get member-join date if the last login time is not found
         if (!$obj->last_login) {
             $obj->last_login = $obj->regdate;
         }
         // Get a member_srl
         $obj->member_srl = getNextSequence();
         $obj->list_order = -1 * $obj->member_srl;
         // List extra vars
         $extra_vars = $obj->extra_vars;
         unset($obj->extra_vars);
         $obj->extra_vars = serialize($extra_vars);
         // Check if the same nickname is existing
         $nick_args = new stdClass();
         $nick_args->nick_name = $obj->nick_name;
         $nick_output = executeQuery('member.getMemberSrl', $nick_args);
         if (!$nick_output->toBool()) {
             $obj->nick_name .= '_' . $obj->member_srl;
         }
         // Add a member
         $output = executeQuery('member.insertMember', $obj);
         if ($output->toBool() && !$obj->password) {
             // Send a mail telling the user to reset his password.
             $oMail = new Mail();
             $oMail->setTitle("Password update for your " . getFullSiteUrl() . " account");
             $webmaster_name = $member_config->webmaster_name ? $member_config->webmaster_name : 'Webmaster';
             $oMail->setContent("Dear {$obj->user_name}, <br /><br />\n\t\t\t\t\t\tWe recently migrated our phpBB forum to XpressEngine. Since you password was encrypted we could not migrate it too, so please reset it by following this link:\n\t\t\t\t\t\t<a href='" . getFullSiteUrl() . "/?act=dispMemberFindAccount' >" . getFullSiteUrl() . "?act=dispMemberFindAccount</a>. You need to enter you email address and hit the 'Find account' button. You will then receive an email with a new, generated password that you can change after login. <br /><br />\n\n\t\t\t\t\t\tThank you for your understanding,<br />\n\t\t\t\t\t\t{$webmaster_name}");
             $oMail->setSender($webmaster_name, $member_config->webmaster_email);
             $oMail->setReceiptor($obj->user_name, $obj->email);
             $oMail->send();
         }
         // add group join/image name-mark-signiture and so on if a new member successfully added
         if ($output->toBool()) {
             // Join to the default group
             $obj->group_srl = $default_group_srl;
             executeQuery('member.addMemberToGroup', $obj);
             // Image name
             if ($obj->image_nickname) {
                 $target_path = sprintf('files/member_extra_info/image_name/%s/', getNumberingPath($obj->member_srl));
                 $target_filename = sprintf('%s%d.gif', $target_path, $obj->member_srl);
                 FileHandler::writeFile($target_filename, $obj->image_nickname);
             }
             // Image mark
             if ($obj->image_mark && file_exists($obj->image_mark)) {
                 $target_path = sprintf('files/member_extra_info/image_mark/%s/', getNumberingPath($obj->member_srl));
                 $target_filename = sprintf('%s%d.gif', $target_path, $obj->member_srl);
                 FileHandler::writeFile($target_filename, $obj->image_mark);
             }
             // Profile image
             if ($obj->profile_image) {
                 $target_path = sprintf('files/member_extra_info/profile_image/%s/', getNumberingPath($obj->member_srl));
                 $target_filename = sprintf('%s%d.gif', $target_path, $obj->member_srl);
                 FileHandler::writeFile($target_filename, $obj->profile_image);
             }
             // Signiture
             if ($obj->signature) {
                 $signature = removeHackTag($obj->signature);
                 $signature_buff = sprintf('<?php if(!defined("__XE__")) exit();?>%s', $signature);
                 $target_path = sprintf('files/member_extra_info/signature/%s/', getNumberingPath($obj->member_srl));
                 if (!is_dir($target_path)) {
                     FileHandler::makeDir($target_path);
                 }
                 $target_filename = sprintf('%s%d.signature.php', $target_path, $obj->member_srl);
                 FileHandler::writeFile($target_filename, $signature_buff);
             }
         }
     }
     fclose($f);
     return $idx - 1;
 }
开发者ID:kimkucheol,项目名称:xe-core,代码行数:101,代码来源:importer.admin.controller.php

示例5: procCommentAdminChangeStatus

 /**
  * Change comment status
  * @return void|object
  */
 function procCommentAdminChangeStatus()
 {
     $will_publish = Context::get('will_publish');
     // Error display if none is selected
     $cart = Context::get('cart');
     if (!$cart) {
         return $this->stop('msg_cart_is_null');
     }
     if (!is_array($cart)) {
         $comment_srl_list = explode('|@|', $cart);
     } else {
         $comment_srl_list = $cart;
     }
     $args = new stdClass();
     $args->status = $will_publish;
     $args->comment_srls_list = $comment_srl_list;
     $output = executeQuery('comment.updatePublishedStatus', $args);
     if (!$output->toBool()) {
         return $output;
     } else {
         //update comment count for document
         $updated_documents_arr = array();
         // create the controller object of the document
         $oDocumentController = getController('document');
         // create the model object of the document
         $oDocumentModel = getModel('document');
         // create the comment model object
         $oCommentModel = getModel('comment');
         //get admin info
         $logged_info = Context::get('logged_info');
         //$oMemberModule = getModel("member");
         //$logged_info = $oMemberModule->getMemberInfoByMemberSrl($logged_member_srl);
         $new_status = $will_publish ? "published" : "unpublished";
         foreach ($comment_srl_list as $comment_srl) {
             // check if comment already exists
             $comment = $oCommentModel->getComment($comment_srl);
             if ($comment->comment_srl != $comment_srl) {
                 return new Object(-1, 'msg_invalid_request');
             }
             $document_srl = $comment->document_srl;
             if (!in_array($document_srl, $updated_documents_arr)) {
                 $updated_documents_arr[] = $document_srl;
                 // update the number of comments
                 $comment_count = $oCommentModel->getCommentCount($document_srl);
                 // update comment count of the article posting
                 $output = $oDocumentController->updateCommentCount($document_srl, $comment_count, NULL, FALSE);
                 $oDocument = $oDocumentModel->getDocument($document_srl);
                 $author_email = $oDocument->variables['email_address'];
                 $oModuleModel = getModel("module");
                 $module_info = $oModuleModel->getModuleInfoByModuleSrl($comment->module_srl);
                 $already_sent = array();
                 // send email to comment's author, all admins and thread(document) subscribers - START
                 // -------------------------------------------------------
                 $oMail = new Mail();
                 $mail_title = "[XE - " . $module_info->mid . "] comment(s) status changed to " . $new_status . " on document: \"" . $oDocument->getTitleText() . "\"";
                 $oMail->setTitle($mail_title);
                 $mail_content = "\n\t\t\t\t\t\tThe comment #" . $comment_srl . " on document \"" . $oDocument->getTitleText() . "\" has been " . $new_status . " by admin of <strong><i>" . strtoupper($module_info->mid) . "</i></strong> module.\n\t\t\t\t\t\t<br />\n\t\t\t\t\t\t<br />Comment content:\n\t\t\t\t\t\t" . $comment->content . "\n\t\t\t\t\t\t<br />\n\t\t\t\t\t\t";
                 $oMail->setContent($mail_content);
                 $oMail->setSender($logged_info->user_name, $logged_info->email_address);
                 $document_author_email = $oDocument->variables['email_address'];
                 //mail to author of thread - START
                 /**
                  * @todo Removed code send email to document author.
                  */
                 /*
                 if($document_author_email != $comment->email_address && $logged_info->email_address != $document_author_email)
                 {
                 	$oMail->setReceiptor($document_author_email, $document_author_email);
                 	$oMail->send();
                 	$already_sent[] = $document_author_email;
                 }
                 */
                 //mail to author of thread - STOP
                 //mail to all emails set for administrators - START
                 if ($module_info->admin_mail) {
                     $target_mail = explode(',', $module_info->admin_mail);
                     for ($i = 0; $i < count($target_mail); $i++) {
                         $email_address = trim($target_mail[$i]);
                         if (!$email_address) {
                             continue;
                         }
                         if ($author_email != $email_address) {
                             $oMail->setReceiptor($email_address, $email_address);
                             $oMail->send();
                         }
                     }
                 }
                 //mail to all emails set for administrators - STOP
             }
             // ----------------------------------------------------------
             // send email to comment's author, all admins and thread(document) subscribers - STOP
         }
         // call a trigger for calling "send mail to subscribers" (for moment just for forum)
         ModuleHandler::triggerCall("comment.procCommentAdminChangeStatus", "after", $comment_srl_list);
     }
     // for message send - start
//.........这里部分代码省略.........
开发者ID:umjinsun12,项目名称:dngshin,代码行数:101,代码来源:comment.admin.controller.php

示例6: Mail

if (preg_match("/^[a-z]+[a-z0-9_-]*(([.]{1})|([a-z0-9_-]*))[a-z0-9_-]+[@]{1}[a-z0-9_-]+[.](([a-z]{2,3})|([a-z]{3}[.]{1}[a-z]{2}))\$/i", $customer_info["email"])) {
    // FIND THE TEMPLATE APPROPRIATE
    try {
        $mail = new Mail(Mail::$TYPE_PAYMENT, $id);
        write_log(LOGFILE_EPAYMENT, basename(__FILE__) . ' line:' . __LINE__ . "-SENDING EMAIL TO CUSTOMER " . $customer_info["email"]);
        $mail->replaceInEmail(Mail::$ITEM_AMOUNT_KEY, $amount_paid);
        $mail->replaceInEmail(Mail::$ITEM_ID_KEY, $id_logrefill);
        $mail->replaceInEmail(Mail::$ITEM_NAME_KEY, 'balance');
        $mail->replaceInEmail(Mail::$PAYMENT_METHOD_KEY, $pmodule);
        $mail->replaceInEmail(Mail::$PAYMENT_STATUS_KEY, $statusmessage);
        $mail->send($customer_info["email"]);
        write_log(LOGFILE_EPAYMENT, basename(__FILE__) . ' line:' . __LINE__ . "-SENDING EMAIL TO CUSTOMER " . $customer_info["email"]);
        write_log(LOGFILE_EPAYMENT, basename(__FILE__) . ' line:' . __LINE__ . "-transactionID={$transactionID}" . "- MAILTO:" . $customer_info["email"] . "-Sub=" . $mail->getTitle() . " , mtext=" . $mail->getMessage());
        // Add Post information / useful to track down payment transaction without having to log
        $mail->AddToMessage("\n\n\n\n" . "-POST Var \n" . print_r($_POST, true));
        $mail->setTitle("COPY FOR ADMIN : " . $mail->getTitle());
        $mail->send(ADMIN_EMAIL);
    } catch (A2bMailException $e) {
        write_log(LOGFILE_EPAYMENT, basename(__FILE__) . ' line:' . __LINE__ . "-transactionID={$transactionID}" . " ERROR NO EMAIL TEMPLATE FOUND");
    }
} else {
    write_log(LOGFILE_EPAYMENT, basename(__FILE__) . ' line:' . __LINE__ . "-transactionID={$transactionID}" . " Customer : no email info !!!");
}
// load the after_process function from the payment modules
$payment_modules->after_process();
write_log(LOGFILE_EPAYMENT, basename(__FILE__) . ' line:' . __LINE__ . "-transactionID={$transactionID}" . " EPAYMENT ORDER STATUS ID = " . $orderStatus . " " . $statusmessage);
write_log(LOGFILE_EPAYMENT, basename(__FILE__) . ' line:' . __LINE__ . "-transactionID={$transactionID}" . " ----EPAYMENT TRANSACTION END----");
if ($transaction_data[0][4] == 'plugnpay') {
    Header("Location: userinfo.php");
    die;
}
开发者ID:hellbound,项目名称:a2billing-mod,代码行数:31,代码来源:checkout_process.php

示例7: procIssuetrackerInsertIssue

 function procIssuetrackerInsertIssue()
 {
     // 권한 체크
     if (!$this->grant->ticket_write) {
         return new Object(-1, 'msg_not_permitted');
     }
     // 글작성시 필요한 변수를 세팅
     $obj = Context::getRequestVars();
     $obj->module_srl = $this->module_srl;
     if (!$obj->title) {
         $obj->title = cut_str(strip_tags($obj->content), 20, '...');
     }
     // 관리자가 아니라면 게시글 색상/굵기 제거
     if (!$this->grant->manager) {
         unset($obj->title_color);
         unset($obj->title_bold);
     }
     // 커미터가 아니라면 마일스톤(계획), 우선순위, 소유자 설정 제거
     // (이슈 상태는 여기서 건드릴수없음 / 종류, 컴포넌트, 패키지 설정은 ticket_write권한이면 가능)
     if (!$this->grant->commiter) {
         unset($obj->assignee_srl);
         unset($obj->milestone_srl);
         unset($obj->priority_srl);
     }
     if ($obj->release_srl) {
         $obj->occured_version_srl = $obj->release_srl;
     }
     if ($obj->occured_version_srl == 0) {
         unset($obj->occured_version_srl);
     }
     // document module의 model 객체 생성
     $oDocumentModel =& getModel('document');
     // document module의 controller 객체 생성
     $oDocumentController =& getController('document');
     // 이미 존재하는 글인지 체크
     $oDocument = $oDocumentModel->getDocument($obj->document_srl, $this->grant->manager);
     // 이미 존재하는 경우 수정
     if ($oDocument->isExists() && $oDocument->document_srl == $obj->document_srl) {
         $output = $oDocumentController->updateDocument($oDocument, $obj);
         $msg_code = 'success_updated';
         if (!$output->toBool()) {
             return $output;
         }
         // 그렇지 않으면 신규 등록
     } else {
         // assignee name
         $oMemberModel =& getModel('member');
         $member_info = $oMemberModel->getMemberInfoByMemberSrl($obj->assignee_srl);
         $obj->assignee_name = $member_info->nick_name;
         // transaction start
         $oDB =& DB::getInstance();
         $oDB->begin();
         $output = executeQuery("issuetracker.insertIssue", $obj);
         if (!$output->toBool()) {
             $oDB->rollback();
             return $output;
         }
         $output = $oDocumentController->insertDocument($obj);
         $msg_code = 'success_registed';
         $obj->document_srl = $output->get('document_srl');
         if (!$output->toBool()) {
             $oDB->rollback();
             return $output;
         }
         $oDB->commit();
         // 문제가 없고 모듈 설정에 관리자 메일이 등록되어 있으면 메일 발송
         if ($output->toBool() && $this->module_info->admin_mail) {
             $oMail = new Mail();
             $oMail->setTitle($obj->title);
             $oMail->setContent(sprintf("From : <a href=\"%s\">%s</a><br/>\r\n%s", getUrl('', 'document_srl', $obj->document_srl), getUrl('', 'document_srl', $obj->document_srl), $obj->content));
             $oMail->setSender($obj->user_name, $obj->email_address);
             $target_mail = explode(',', $this->module_info->admin_mail);
             for ($i = 0; $i < count($target_mail); $i++) {
                 $email_address = trim($target_mail[$i]);
                 if (!$email_address) {
                     continue;
                 }
                 $oMail->setReceiptor($email_address, $email_address);
                 $oMail->send();
             }
         }
     }
     // 오류 발생시 멈춤
     if (!$output->toBool()) {
         return $output;
     }
     // 결과를 리턴
     $this->add('mid', Context::get('mid'));
     $this->add('document_srl', $output->get('document_srl'));
     // 성공 메세지 등록
     $this->setMessage($msg_code);
 }
开发者ID:hottaro,项目名称:xpressengine,代码行数:92,代码来源:issuetracker.controller.php

示例8: procMemberModifyEmailAddress

 function procMemberModifyEmailAddress()
 {
     if (!Context::get('is_logged')) {
         return $this->stop('msg_not_logged');
     }
     $member_info = Context::get('logged_info');
     $newEmail = Context::get('email_address');
     if (!$newEmail) {
         return $this->stop('msg_invalid_request');
     }
     $oMemberModel = getModel('member');
     // Check managed Email Host
     if ($oMemberModel->isDeniedEmailHost($newEmail)) {
         $config = $oMemberModel->getMemberConfig();
         $emailhost_check = $config->emailhost_check;
         $managed_email_host = lang('managed_email_host');
         $email_hosts = $oMemberModel->getManagedEmailHosts();
         foreach ($email_hosts as $host) {
             $hosts[] = $host->email_host;
         }
         $message = sprintf($managed_email_host[$emailhost_check], implode(', ', $hosts), 'id@' . implode(', id@', $hosts));
         return new Object(-1, $message);
     }
     // Check if the e-mail address is already registered
     $member_srl = $oMemberModel->getMemberSrlByEmailAddress($newEmail);
     if ($member_srl) {
         return new Object(-1, 'msg_exists_email_address');
     }
     if ($_SESSION['rechecked_password_step'] != 'INPUT_DATA') {
         return $this->stop('msg_invalid_request');
     }
     unset($_SESSION['rechecked_password_step']);
     $auth_args = new stdClass();
     $auth_args->user_id = $newEmail;
     $auth_args->member_srl = $member_info->member_srl;
     $auth_args->auth_key = Rhymix\Framework\Security::getRandom(40, 'hex');
     $auth_args->new_password = 'XE_change_emaill_address';
     $oDB =& DB::getInstance();
     $oDB->begin();
     $output = executeQuery('member.insertAuthMail', $auth_args);
     if (!$output->toBool()) {
         $oDB->rollback();
         return $output;
     }
     $oModuleModel = getModel('module');
     $member_config = $oModuleModel->getModuleConfig('member');
     $tpl_path = sprintf('%sskins/%s', $this->module_path, $member_config->skin);
     if (!is_dir($tpl_path)) {
         $tpl_path = sprintf('%sskins/%s', $this->module_path, 'default');
     }
     global $lang;
     $memberInfo = array();
     $memberInfo[$lang->email_address] = $member_info->email_address;
     $memberInfo[$lang->nick_name] = $member_info->nick_name;
     Context::set('memberInfo', $memberInfo);
     Context::set('newEmail', $newEmail);
     $auth_url = getFullUrl('', 'module', 'member', 'act', 'procMemberAuthEmailAddress', 'member_srl', $member_info->member_srl, 'auth_key', $auth_args->auth_key);
     Context::set('auth_url', $auth_url);
     $oTemplate =& TemplateHandler::getInstance();
     $content = $oTemplate->compile($tpl_path, 'confirm_member_new_email');
     $oMail = new Mail();
     $oMail->setTitle(lang('title_modify_email_address'));
     $oMail->setContent($content);
     $oMail->setSender($member_config->webmaster_name ? $member_config->webmaster_name : 'webmaster', $member_config->webmaster_email);
     $oMail->setReceiptor($member_info->nick_name, $newEmail);
     $result = $oMail->send();
     $msg = sprintf(lang('msg_confirm_mail_sent'), $newEmail);
     $this->setMessage($msg);
     $returnUrl = Context::get('success_return_url') ? Context::get('success_return_url') : getNotEncodedUrl('', 'mid', Context::get('mid'), 'act', '');
     $this->setRedirectUrl($returnUrl);
 }
开发者ID:rhymix,项目名称:rhymix,代码行数:71,代码来源:member.controller.php

示例9: procContactSendEmail

 /**
  * @brief send email 
  **/
 function procContactSendEmail()
 {
     $logged_info = Context::get('logged_info');
     if ($this->module_info->send_grant_all != 'Y' && !$logged_info) {
         return new Object(-1, 'msg_logged_can_send_mail');
     }
     if (!$this->module_info->admin_mail) {
         return new Object(-1, 'msg_do_set_admin_mail');
     }
     $oMail = new Mail();
     $oMail->setContentType("plain");
     // get form variables submitted
     $obj = Context::getRequestVars();
     if ($obj->enable_terms == 'Y' && !$obj->check_agree) {
         return new Object(-1, 'msg_terms_of_license_agreement');
     }
     $obj->email = $obj->Email;
     $obj->subject = $obj->Subject;
     $obj->comment = $obj->Comment;
     $oDocumentModel =& getModel('document');
     $extra_keys = $oDocumentModel->getExtraKeys($obj->module_srl);
     $mail_content = array();
     $filter_lang = Context::getLang('filter');
     $content = '';
     if (count($extra_keys)) {
         $oModuleController =& getController('module');
         foreach ($extra_keys as $idx => $extra_item) {
             $value = '';
             if (isset($obj->{'extra_vars' . $idx})) {
                 $value = $obj->{'extra_vars' . $idx};
             } elseif (isset($obj->{$extra_item->eid})) {
                 $value = $obj->{$extra_item->eid};
             }
             if (!is_array($value)) {
                 $value = trim($value);
             }
             if (!isset($value)) {
                 continue;
             }
             //check if extra item is required
             $oModuleController->replaceDefinedLangCode($extra_item->name);
             if ($extra_item->is_required == 'Y' && $value == "") {
                 return new Object(-1, sprintf($filter_lang->invalid, $extra_item->name));
             }
             //if the type of form component is email address
             if ($extra_item->type == 'email_address' && !$oMail->isVaildMailAddress($value)) {
                 return new Object(-1, sprintf($filter_lang->invalid_email, $extra_item->name));
             }
             if ($extra_item->type == "tel") {
                 $mail_content[$extra_item->eid] = $obj->{'extra_vars' . $idx}[2];
                 $content .= $extra_item->name . ':  ' . $obj->{'extra_vars' . $idx}[2] . "\r\n";
             } elseif (is_array($obj->{'extra_vars' . $idx})) {
                 $mail_content[$extra_item->eid] = implode(",", $obj->{'extra_vars' . $idx});
                 $content .= $extra_item->name . ':  ' . implode(",", $obj->{'extra_vars' . $idx}) . "\r\n";
             } else {
                 $mail_content[$extra_item->eid] = $value;
                 $content .= $extra_item->name . ':  ' . $value . "\r\n";
             }
             $mail_title[$extra_item->eid] = htmlspecialchars($extra_item->name);
         }
     }
     if (!$oMail->isVaildMailAddress($obj->email)) {
         return new Object(-1, sprintf($filter_lang->invalid_email, Context::getLang('email_address')));
     }
     $oMail->setTitle($obj->subject);
     $content_all = $content . "\r\nComments:\r\n" . htmlspecialchars($obj->comment);
     $mail_content['Comments'] = $obj->comment;
     $oMail->setContent(htmlspecialchars($content_all));
     //$oMail->setSender("XE Contact Us", $obj->email);
     $oMail->setSender($obj->email . "(" . $_SERVER['REMOTE_ADDR'] . ")", $obj->email);
     $target_mail = explode(',', $this->module_info->admin_mail);
     for ($i = 0; $i < count($target_mail); $i++) {
         $email_address = trim($target_mail[$i]);
         if (!$email_address || !$oMail->isVaildMailAddress($email_address)) {
             continue;
         }
         $oMail->setReceiptor($email_address, $email_address);
         if ($logged_info->is_admin != 'Y') {
             if ($this->module_info->module_srl) {
                 $oModuleModel =& getModel('module');
                 $moduleExtraVars = $oModuleModel->getModuleExtraVars($this->module_info->module_srl);
                 if ($moduleExtraVars[$this->module_info->module_srl]->interval) {
                     $interval = $moduleExtraVars[$this->module_info->module_srl]->interval;
                     //transfer interval to mins
                     $interval = $interval * 60;
                     $oContactModel =& getModel('contact');
                     $output = $oContactModel->checkLimited($interval);
                     if (!$output->toBool()) {
                         return $output;
                     }
                 }
             }
         }
         $oMail->send();
     }
     if (isset($_SESSION['mail_content'])) {
         unset($_SESSION['mail_content']);
//.........这里部分代码省略.........
开发者ID:laiello,项目名称:xe-contact,代码行数:101,代码来源:contact.controller.php

示例10: WHERE

        $QUERY = "UPDATE cc_card SET status = 1 WHERE ( status = 2 OR status = 3 ) AND loginkey = '" . $key . "' ";
    } else {
        // Status : 2 - New
        $QUERY = "UPDATE cc_card SET status = 2 WHERE ( status = 2 OR status = 3 ) AND loginkey = '" . $key . "' ";
    }
    $result = $instance_sub_table->SQLExec($HD_Form->DBHandle, $QUERY, 0);
}
if ($list[0][8] != "1" && isset($result) && $result != null) {
    list($username, $lastname, $firstname, $email, $uipass, $credit, $cardalias, $loginkey, $status, $idcard) = $list[0];
    if ($FG_DEBUG == 1) {
        echo "<br/># {$username}, {$lastname}, {$firstname}, {$email}, {$uipass}, {$credit}, {$cardalias} #<br/>";
    }
    try {
        $mail = new Mail(Mail::$TYPE_SIGNUPCONFIRM, $idcard);
        $mail->send($email);
        $mail->setTitle("NEW ACCOUNT CREATED : " . $mail->getTitle());
        $mail->send(ADMIN_EMAIL);
    } catch (A2bMailException $e) {
        echo "Error : sent mail!";
    }
    ?>

<blockquote>
    <div align="center"><br/><br/>
     <font color="#FF0000"><b><?php 
    echo gettext("Welcome! Your account has been successfully activated. Thank you!");
    ?>
</b></font><br/>
          <br/><br/>
          <?php 
    echo $list[0][2];
开发者ID:saydulk,项目名称:a2billing,代码行数:31,代码来源:activate.php

示例11: procShopInsertComment

        /**
         * comment insert
         **/
        function procShopInsertComment() {
            $oDocumentModel = &getModel('document');
            $oCommentModel = &getModel('comment');
            $oCommentController = &getController('comment');

            if(!$this->grant->write_comment) return new Object(-1, 'msg_not_permitted');

            $obj = Context::gets('document_srl','comment_srl','parent_srl','content','password','nick_name','member_srl','email_address','homepage','is_secret','notify_message');
            $obj->module_srl = $this->module_srl;

            $oDocument = $oDocumentModel->getDocument($obj->document_srl);
            if(!$oDocument->isExists()) return new Object(-1,'msg_not_permitted');

            if(!$obj->comment_srl) $obj->comment_srl = getNextSequence();
            else $comment = $oCommentModel->getComment($obj->comment_srl, $this->grant->manager);

            if($comment->comment_srl != $obj->comment_srl) {
                if($obj->parent_srl) {
                    $parent_comment = $oCommentModel->getComment($obj->parent_srl);
                    if(!$parent_comment->comment_srl) return new Object(-1, 'msg_invalid_request');

                    $output = $oCommentController->insertComment($obj);

                } else {
                    $output = $oCommentController->insertComment($obj);
                }

                if($output->toBool() && $this->module_info->admin_mail) {
                    $oMail = new Mail();
                    $oMail->setTitle($oDocument->getTitleText());
                    $oMail->setContent( sprintf("From : <a href=\"%s#comment_%d\">%s#comment_%d</a><br/>\r\n%s", $oDocument->getPermanentUrl(), $obj->comment_srl, $oDocument->getPermanentUrl(), $obj->comment_srl, $obj->content));
                    $oMail->setSender($obj->nick_name, $obj->email_address);

                    $target_mail = explode(',',$this->module_info->admin_mail);
                    for($i=0;$i<count($target_mail);$i++) {
                        $email_address = trim($target_mail[$i]);
                        if(!$email_address) continue;
                        $oMail->setReceiptor($email_address, $email_address);
                        $oMail->send();
                    }
                }

            } else {
                $obj->parent_srl = $comment->parent_srl;
                $output = $oCommentController->updateComment($obj, $this->grant->manager);
                $comment_srl = $obj->comment_srl;
            }
            if(!$output->toBool()) return $output;

			$this->setRedirectUrl($_SERVER['HTTP_REFERER']);
        }
开发者ID:haegyung,项目名称:xe-module-shop,代码行数:54,代码来源:shop.controller.php

示例12: sendEmail

 /**
  * 휴면 안내메일을 발송하는 메소드.
  */
 public function sendEmail($member_srl, $config = null, $resend = true, $use_transaction = true)
 {
     // 회원 오브젝트를 통째로 받은 경우 member_srl을 추출한다.
     if (is_object($member_srl) && isset($member_srl->member_srl)) {
         $member = $member_srl;
         $member_srl = $member_srl->member_srl;
     } else {
         $args = new stdClass();
         $args->member_srl = $member_srl;
         $member_query = executeQuery('member.getMemberInfoByMemberSrl', $args);
         if (!$member_query->toBool() || !$member_query->data) {
             return -41;
         }
         $member = is_object($member_query->data) ? $member_query->data : reset($member_query->data);
         if (!$member) {
             return -42;
         }
         $member_srl = $member->member_srl;
     }
     // 모듈 설정이 로딩되지 않은 경우 지금 로딩한다.
     if (!$config) {
         $config = $this->getConfig();
     }
     // 이미 발송한 경우, $resend = true가 아니라면 재발송하지 않는다.
     $args = new stdClass();
     $args->member_srl = $member_srl;
     $output = executeQuery('member_expire.getNotifiedDates', $args);
     if (!$output->toBool()) {
         return -43;
     }
     if (count($output->data) && !$resend) {
         return 2;
     }
     // 정리 예정일을 계산한다.
     $start_date = strtotime($config->auto_start) + zgap();
     $base_date = $member->last_login ? $member->last_login : $member->regdate;
     $base_date = $base_date ? ztime($base_date) : 0;
     $expire_date = $base_date + 86400 * $config->expire_threshold;
     if ($expire_date < $start_date) {
         $expire_date = $start_date;
     }
     $member->expire_date = date('YmdHis', $expire_date);
     // 매크로를 변환한다.
     $site_title = Context::getSiteTitle();
     $macros = array('{SITE_NAME}' => htmlspecialchars($site_title, ENT_QUOTES, 'UTF-8', false), '{USER_ID}' => htmlspecialchars($member->user_id, ENT_QUOTES, 'UTF-8', false), '{USER_NAME}' => htmlspecialchars($member->user_name, ENT_QUOTES, 'UTF-8', false), '{NICK_NAME}' => htmlspecialchars($member->nick_name, ENT_QUOTES, 'UTF-8', false), '{EMAIL}' => htmlspecialchars($member->email_address, ENT_QUOTES, 'UTF-8', false), '{LOGIN_DATE}' => $base_date ? date('Y년 n월 j일', $base_date) : '(로그인 기록 없음)', '{EXPIRE_DATE}' => date('Y년 n월 j일', $expire_date), '{TIME_LIMIT}' => $this->translateThreshold($config->expire_threshold), '{CLEAN_METHOD}' => $config->expire_method === 'delete' ? '삭제' : '별도의 저장공간으로 이동');
     // 메일을 작성하여 발송한다.
     $subject = htmlspecialchars_decode(str_replace(array_keys($macros), array_values($macros), $config->email_subject));
     $content = str_replace(array_keys($macros), array_values($macros), $config->email_content);
     $recipient_name = $member->user_name ? $member->user_name : ($member->nick_name ? $member->nick_name : 'member');
     static $sender_name = null;
     static $sender_email = null;
     if ($sender_name === null) {
         $member_config = getModel('module')->getModuleConfig('member');
         $sender_name = $member_config->webmaster_name ? $member_config->webmaster_name : ($site_title ? $site_title : 'webmaster');
         $sender_email = $member_config->webmaster_email;
     }
     $oMail = new Mail();
     $oMail->setTitle($subject);
     $oMail->setContent($content);
     $oMail->setSender($sender_name, $sender_email);
     $oMail->setReceiptor($recipient_name, $member->email_address);
     $oMail->send();
     // 트랜잭션을 시작한다.
     if ($use_transaction) {
         $this->oDB->begin();
     }
     // 발송한 메일을 기록한다.
     $output = executeQuery('member_expire.deleteNotifiedDate', $member);
     if (!$output->toBool()) {
         if ($use_transaction) {
             $this->oDB->rollback();
         }
         return -44;
     }
     $output = executeQuery('member_expire.insertNotifiedDate', $member);
     if (!$output->toBool()) {
         if ($use_transaction) {
             $this->oDB->rollback();
         }
         return -45;
     }
     // 트랜잭션을 커밋한다.
     if ($use_transaction) {
         $this->oDB->commit();
     }
     return 1;
 }
开发者ID:bjrambo,项目名称:xe-member-expire,代码行数:90,代码来源:member_expire.model.php

示例13: sendEmailsToSubscribers

 /**
  * send email to subscribers
  * @param Newsletter $newsletter
  * @param $site_srl
  */
 public function sendEmailsToSubscribers(Newsletter $newsletter, $site_srl)
 {
     $shopModel = getModel('shop');
     $customerRepository = $shopModel->getCustomerRepository();
     $output = $customerRepository->getNewsletterCustomers($site_srl, 'Y');
     $emails_list = "";
     foreach ($output->customers as $customer) {
         //add unsubscribe link to $newsletter->content;
         $newsletter_content = $newsletter->content . "</br></br>" . sprintf(Context::getLang('unsubscribe_message'), getUrl('', 'act', 'procShopUnsignToNewsletter', 'member_srl', $customer->member_srl, 'email_address', $customer->email_address));
         $oMail = new Mail();
         $oMail->setTitle($newsletter->subject);
         $oMail->setContent($newsletter_content);
         $oMail->setSender($newsletter->sender_name, $newsletter->sender_email);
         $oMail->setReceiptor(false, $customer->email_address);
         $oMail->send();
     }
 }
开发者ID:haegyung,项目名称:xe-module-shop,代码行数:22,代码来源:NewsletterRepository.php

示例14: sendNewOrderMailToAdministrator

 private static function sendNewOrderMailToAdministrator($shop, $order)
 {
     // Don't send anything if admin email is not configured
     if (!$shop->getEmail()) {
         ShopLogger::log("Failed to send order email to admin for order #{$order->order_srl}; Admin email is not configured");
         return;
     }
     global $lang;
     $admin_email_subject = sprintf($lang->admin_order_email_subject, $order->client_name, ShopDisplay::priceFormat($order->total, $shop->getCurrencySymbol()));
     Context::set('email_order', $order);
     $oTemplateHandler = TemplateHandler::getInstance();
     $order_content = $oTemplateHandler->compile('./modules/shop/tpl', 'order_email.html');
     $admin_email_content = sprintf($lang->admin_order_email_content, getFullSiteUrl('', 'act', 'dispShopToolViewOrder', 'order_srl', $order->order_srl), $order->order_srl, $order_content);
     $oMail = new Mail();
     $oMail->setTitle($admin_email_subject);
     $oMail->setContent($admin_email_content);
     $oMail->setSender($shop->getShopTitle(), $shop->getShopEmail());
     $oMail->setReceiptor(false, $shop->getEmail());
     $oMail->send();
 }
开发者ID:haegyung,项目名称:xe-module-shop,代码行数:20,代码来源:Order.php

示例15: procBoardInsertDocument

 /**
  * @brief insert document
  **/
 function procBoardInsertDocument()
 {
     // check grant
     if ($this->module_info->module != "board") {
         return new Object(-1, "msg_invalid_request");
     }
     if (!$this->grant->write_document) {
         return new Object(-1, 'msg_not_permitted');
     }
     $logged_info = Context::get('logged_info');
     // setup variables
     $obj = Context::getRequestVars();
     $obj->module_srl = $this->module_srl;
     if ($obj->is_notice != 'Y' || !$this->grant->manager) {
         $obj->is_notice = 'N';
     }
     $obj->commentStatus = $obj->comment_status;
     settype($obj->title, "string");
     if ($obj->title == '') {
         $obj->title = cut_str(strip_tags($obj->content), 20, '...');
     }
     //setup dpcument title tp 'Untitled'
     if ($obj->title == '') {
         $obj->title = 'Untitled';
     }
     // unset document style if the user is not the document manager
     if (!$this->grant->manager) {
         unset($obj->title_color);
         unset($obj->title_bold);
     }
     // generate document module model object
     $oDocumentModel =& getModel('document');
     // generate document module의 controller object
     $oDocumentController =& getController('document');
     // check if the document is existed
     $oDocument = $oDocumentModel->getDocument($obj->document_srl, $this->grant->manager);
     // if use anonymous is true
     if ($this->module_info->use_anonymous == 'Y') {
         $obj->notify_message = 'N';
         $this->module_info->admin_mail = '';
         $obj->member_srl = -1 * $logged_info->member_srl;
         $obj->email_address = $obj->homepage = $obj->user_id = '';
         $obj->user_name = $obj->nick_name = 'anonymous';
         $bAnonymous = true;
         $oDocument->add('member_srl', $obj->member_srl);
     } else {
         $bAnonymous = false;
     }
     // update the document if it is existed
     if ($oDocument->isExists() && $oDocument->document_srl == $obj->document_srl) {
         if (!$oDocument->isGranted()) {
             return new Object(-1, 'msg_not_permitted');
         }
         if (!$this->grant->manager) {
             // notice & document style same as before if not manager
             $obj->is_notice = $oDocument->get('is_notice');
             $obj->title_color = $oDocument->get('title_color');
             $obj->title_bold = $oDocument->get('title_bold');
         }
         $output = $oDocumentController->updateDocument($oDocument, $obj);
         $msg_code = 'success_updated';
         // insert a new document otherwise
     } else {
         $output = $oDocumentController->insertDocument($obj, $bAnonymous);
         $msg_code = 'success_registed';
         $obj->document_srl = $output->get('document_srl');
         // send an email to admin user
         if ($output->toBool() && $this->module_info->admin_mail) {
             $oMail = new Mail();
             $oMail->setTitle($obj->title);
             $oMail->setContent(sprintf("From : <a href=\"%s\">%s</a><br/>\r\n%s", getFullUrl('', 'document_srl', $obj->document_srl), getFullUrl('', 'document_srl', $obj->document_srl), $obj->content));
             $oMail->setSender($obj->user_name, $obj->email_address);
             $target_mail = explode(',', $this->module_info->admin_mail);
             for ($i = 0; $i < count($target_mail); $i++) {
                 $email_address = trim($target_mail[$i]);
                 if (!$email_address) {
                     continue;
                 }
                 $oMail->setReceiptor($email_address, $email_address);
                 $oMail->send();
             }
         }
     }
     // if there is an error
     if (!$output->toBool()) {
         return $output;
     }
     // return the results
     $this->add('mid', Context::get('mid'));
     $this->add('document_srl', $output->get('document_srl'));
     // alert a message
     $this->setMessage($msg_code);
 }
开发者ID:google-code-backups,项目名称:xe-board,代码行数:96,代码来源:board.controller.php


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