function handleException($e)
 {
     $this->_exception = $e;
     $mail = new Qdmail();
     $mail->to($this->exceptionRecipients);
     $mail->subject('[' . $this->_getSeverityAsString() . '] ' . $this->_exception->getMessage());
     $mail->text($this->_getText());
     $mail->from(array('*****@*****.**', 'Exception Notifier'));
     $mail->send();
 }
コード例 #2
0
 public function handleException($e)
 {
     $this->_exception = $e;
     $mail = new Qdmail();
     $mail->smtp($this->useSmtp);
     $mail->smtpServer($this->smtpParams);
     $mail->to($this->exceptionRecipients);
     $mail->subject($this->subjectPrefix . '[' . date('Ymd H:i:s') . '][' . $this->_getSeverityAsString() . '][' . $this->_getUrl() . '] ' . $this->_exception->getMessage());
     $mail->text($this->_getText());
     $mail->from($this->exceptionFrom);
     $mail->send();
 }
コード例 #3
0
function mailsender($to, $subject, $body, $fromname, $fromaddress)
{
    //SMTP送信
    $mail = new Qdmail();
    $mail->smtp(true);
    $param = array('host' => 'tls://*********', 'port' => 465, 'from' => '*********@*********', 'protocol' => 'SMTP_AUTH', 'user' => '*********@*********', 'pass' => '*********');
    $mail->smtpServer($param);
    $mail->to($to);
    $mail->subject($subject);
    $mail->from($fromaddress, $fromname);
    $mail->text($body);
    $return_flag = $mail->send();
    return $return_flag;
}
コード例 #4
0
ファイル: index.php プロジェクト: regepan/TransmitMail
 // 件名
 $to_subject = TO_SUBJECT;
 // メール本文
 $body = $tmpl->fetch(MAIL_BODY);
 $body = hd($body);
 // メール送信元
 if (isset($_POST[AUTO_REPLY_EMAIL]) && !empty($_POST[AUTO_REPLY_EMAIL])) {
     $from_email = $_POST[AUTO_REPLY_EMAIL];
 } else {
     $from_email = $to_email;
 }
 // メール送信内容
 $mail->to($to_email);
 $mail->subject($to_subject);
 $mail->text($body);
 $mail->from($from_email);
 // CCメールアドレスの設定がある場合
 if (CC_EMAIL !== '') {
     $mail->cc(CC_EMAIL);
 }
 // BCCメールアドレスの設定がある場合
 if (BCC_EMAIL !== '') {
     $mail->bcc(BCC_EMAIL);
 }
 // 添付ファイル機能を利用する場合
 if (FILE) {
     foreach ($files as $file) {
         $attach[] = array('PATH' => DIR_TEMP . '/' . $file['tmp_name'], 'NAME' => $file['name']);
     }
     if (isset($attach)) {
         $mail->attach($attach);
コード例 #5
0
    foreach ($params as $p) {
        $fields[$p] = params($p);
    }
    $res = $CON->autoExecute('applications', $fields, DB_AUTOQUERY_INSERT);
    // workshop increment
    $workshops = array('workshop', 'kids_1_workshop_am', 'kids_1_workshop_pm', 'kids_2_workshop_am', 'kids_2_workshop_pm');
    foreach ($workshops as $workshop) {
        if (isset($_REQUEST[$workshop])) {
            $CON->query("UPDATE workshops SET num = num + 1 WHERE name = ?", array($_REQUEST[$workshop]));
        }
    }
    // application mail
    $app_body = fetch('application.txt.php');
    $app_mail = new Qdmail();
    $app_mail->to(APP_MAIL_TO);
    $app_mail->bcc(APP_MAIL_BCC);
    $app_mail->subject(APP_MAIL_SUBJECT);
    $app_mail->text($app_body);
    $app_mail->from(APP_MAIL_FROM);
    $app_mail->send();
    // application auto reply mail
    $reply_body = fetch('application_auto_reply.txt.php');
    $reply_mail = new Qdmail();
    $reply_mail->to(params('email'));
    $reply_mail->bcc(APP_REPLY_MAIL_BCC);
    $reply_mail->subject(APP_REPLY_MAIL_SUBJECT);
    $reply_mail->text($reply_body);
    $reply_mail->from(APP_REPLY_MAIL_FROM);
    $reply_mail->send();
    redirect('application_created.php');
}
コード例 #6
0
ファイル: form.php プロジェクト: webgoto/amf
 /**
  * メールを送信して結果を返す
  */
 private function mail_send()
 {
     $is_send = true;
     foreach ($this->mails as $mail_info) {
         $mail = new \Qdmail();
         $mail->to($this->replace_placeholder($mail_info['to']));
         $mail->from($this->replace_placeholder($mail_info['from']));
         $mail->subject($this->replace_placeholder($mail_info['subject']));
         $mail->text($this->replace_placeholder($mail_info['body']));
         if (isset($mail_info['cc'])) {
             $mail->cc($this->replace_placeholder($mail_info['cc']));
         }
         if (isset($mail_info['bcc'])) {
             $mail->cc($this->replace_placeholder($mail_info['bcc']));
         }
         if (isset($mail_info['replyto'])) {
             $mail->cc($this->replace_placeholder($mail_info['replyto']));
         }
         if (!$mail->send()) {
             $is_send = false;
         }
     }
     return $is_send;
 }
コード例 #7
0
ファイル: mail.php プロジェクト: ryoueno/RankChannel
require_once './qdsmtp.php';
require_once './qdmail.php';
//ヒアドキュメントを使用
$mailBody = <<<EOT
本文本文本文本文本文本文本文本文本文
本文本文本文本文本文本文本文本文本文
本文本文本文本文本文本文本文本文本文
EOT;
$mail = new Qdmail();
$mail->errorDisplay(FALSE);
$mail->smtpObject()->error_display = FALSE;
$from = "*****@*****.**";
//宛先
$to = "*****@*****.**";
//送信元
$mail->from($from, "Webマスター");
//宛先名
$mail->to($to, "管理者");
//送信元名
$mail->subject("お問合せ");
//件名
$mail->text($mailBody);
//本文
//データを格納する
$param = array("host" => "ssl://smtp.gmail.com", "port" => 465, "from" => "*****@*****.**", "protocol" => "SMTP_AUTH", "user" => "*****@*****.**", "pass" => "rrrr0611");
$mail->smtp(TRUE);
$mail->smtpServer($param);
$flag = $mail->send();
if ($flag == TRUE) {
    print "送信成功";
} else {
コード例 #8
0
	/** 
	 * メール送信
	 * 
	 * メールを送信する<br>
	 * 
	 * @access public
	 * @param string
	 * @return void メールタイプ
	 */
	function send_mail($type="text", $debug=false)
	{
		//メール送信
		$mail = new Qdmail(null, null, null, $debug);
		$mail -> lineFeed("\n");
		$mail->from($this->from, $this->from_name);
		$mail->to($this->to, $this->to_name);
		if (count($this->cc) > 0) $mail->cc($this->cc, $this->cc_name);
		if (count($this->bcc) > 0) $mail->bcc($this->bcc, $this->bcc_name);
		$mail->replyto($this->replyto, $this->replyto_name);
		$mail->subject($this->subject);
		$mail->text($this->message);
		$ret = $mail->send();
		$this->reset();
		return $ret;
	}
コード例 #9
0
ファイル: MY_Controller.php プロジェクト: phamhoaian/ci-cms
 /**
  *  メールを送信する
  */
 protected function mail_send($mail_address_to, $mail_subject, $mail_content, $mail_address_from = '', $mail_attach_path = '')
 {
     $this->load->library('qdmail');
     $this->load->helper('email');
     if (!valid_email("{$mail_address_to}")) {
         return FALSE;
     }
     if (!$mail_address_from) {
         $mail_address_from = MAIL_ADDRESS_FROM;
     }
     $mail = new Qdmail();
     $mail->to("{$mail_address_to}");
     $mail->subject("{$mail_subject}");
     $mail->text("{$mail_content}");
     $mail->from("{$mail_address_from}");
     if ($mail_attach_path and file_exists($mail_attach_path)) {
         $mail->attach($mail_attach_path);
     }
     $mail->send();
     //qd_send_mail('text',$mail_address_to,"$title",$mail_content,"$mail_address_from");
     return TRUE;
 }
コード例 #10
0
ファイル: dlexec.php プロジェクト: big2men/qhm
function dl_sendmail($email, $filename, $title)
{
    global $smtp_auth, $smtp_server, $google_apps, $google_apps_domain;
    $qm = get_qm();
    $xsubject = $title == '' ? $qm->replace('plg_dlbutton.subject', '') : $title;
    $xmsg = $qm->replace('plg_dlbutton.mail_body', $filename);
    $xheader = "From: " . $email . "\n";
    $xparameter = "-f" . $email;
    //Mail send setting
    if ($google_apps && preg_match('/.*' . $google_apps_domain . '$/', $email)) {
        $mail = new Qdmail();
        $mail->smtp(true);
        $param = array('host' => 'ASPMX.L.GOOGLE.com', 'port' => 25, 'from' => $email, 'protocol' => 'SMTP', 'user' => 'root@' . $google_apps_domain, 'pass' => $passwd);
        $mail->smtpServer($param);
        $mail->to($email);
        $mail->subject($xsubject);
        $mail->from($email);
        $mail->text($xmsg);
        $return_flag = $mail->send();
    } else {
        $mail = new SimpleMail();
        $mail->set_params('', $email);
        $mail->set_to('', $email);
        $mail->set_subject($xsubject);
        $mail->send($xmsg);
    }
}
コード例 #11
0
ファイル: index.php プロジェクト: retroclam/hanlove
    public function send_mail()
    {
        //Paramin
        $nick = mb_convert_encoding($_REQUEST['u_name'], "EUC-JP", 'Shift-JIS');
        $invite_name = mb_convert_encoding($_REQUEST['invite_name'], "EUC-JP", 'Shift-JIS');
        $dec_id = $_REQUEST['dec_id'];
        $invite_adr = $_REQUEST['invite_adr'];
        $sql = "SELECT `u_id` from `hanluv_user` ";
        /////仮の値、修正が必要!!
        $sql .= "where `u_subno` = '34'";
        $res = $this->index_model->getAll($sql);
        //■招待元がいれば処理を実行
        if (!empty($res[0][0])) {
            $invite_from = $res[0][0];
            //■招待対象者のアドレス重複チェック
            $sql = "SELECT count(*) from hanluv_user ";
            $sql .= "where u_mail = '{$invite_adr}' ";
            $sql .= "AND  u_cflg =0";
            $res = $this->index_model->getRow($sql);
            //■重複調査結果の判別
            if ($res[0] > 0) {
                //招待元の情報更新
                $sql = "UPDATE `hanluv_user` SET";
                $sql .= "`invite_from` =  '{$invite_from}'";
                $sql .= "WHERE  `u_mail` ='{$invite_adr}';";
                $res = $this->index_model->query($sql);
            } else {
                //招待先の新規登録
                $sql = "INSERT INTO hanluv_user ";
                $sql .= "(u_mail,u_name,invite_from) ";
                $sql .= "VALUES ('{$invite_adr}','hanluv','{$invite_from}')";
                $res = $this->index_model->query($sql);
            }
            //■データの登録
            $ng_check = 0;
            if ($ng_check == 0) {
                //■招待さきIDの取得
                $con = $this->index_model->PDOconnect();
                $sql = "SELECT `u_id` from `hanluv_user` ";
                $sql .= "where `u_mail` = '{$invite_adr}'";
                $res = $this->index_model->getAll($sql);
                $invite_to = $res[0][0];
                //招待元の情報更新
                $sql = "UPDATE  `cp-gag`.`hanluv_user` SET";
                $sql .= "`dec_id` =  '{$dec_id}',`invite_to` =  '{$invite_to}'";
                $sql .= "WHERE  `hanluv_user`.`u_id` ='{$invite_from}';";
                $res = $this->index_model->query($sql);
                //■招待メール
                $mail_key = "invite_mail";
                //診断用URL作成
                $invite_url = 'http://han-love.from.tv';
                //@todo:param settings
                //$invite_url .= '?a='.$invite_from.'&t='.$invite_from.'&guid=ON';
                //かつて同じ組み合わせで招待したことがあるか確認
                $sql = "SELECT count(*) from h_invite ";
                $sql .= "where `invite_from` = {$invite_from} ";
                $sql .= "AND  `invite_to` \t= {$invite_to} ";
                $res = $this->index_model->getRow($sql);
                if ($res[0] < 1) {
                    //招待情報の登録
                    $sql = "INSERT INTO h_invite ";
                    $sql .= "(`invite_id` ,`invite_from` ,`invite_to` ,`invite_comp` ,`invite_time`) ";
                    $sql .= "VALUES (NULL ,  '{$invite_from}',  '{$invite_to}',  '0', CURRENT_TIMESTAMP)";
                    $res = $this->index_model->query($sql);
                }
            } else {
                echo 'duplicate';
            }
        }
        //■メール文章の抽出
        if (empty($mail_key)) {
            //■例外処理
            exit;
        } else {
            $sql = "SELECT\t`s_value` from `system_values` ";
            $sql .= "WHERE \t`s_key` = '{$mail_key}'";
            $res = $this->index_model->getAll($sql);
            $body = $res[0]['s_value'];
        }
        /************************************************/
        /******************  Mail  **********************/
        /************************************************/
        if ($ng_check == 0) {
            //■セクション独自タグの置換
            $body = str_replace("{invite_url}", $invite_url, $body);
            $body = str_replace("{u_name}", $nick, $body);
            $body = str_replace("{invite_name}", $invite_name, $body);
            //$this->load->library('mobmail');
            //■タグ置換
            //$body = $this->index_model->tag_Analyze($body);
            //■メール送信
            //mb_internal_encoding( "EUC-JP");
            $subject = $invite_name . 'さんにオススメの韓流サイト!!';
            require_once 'qdmail.php';
            $mail = new Qdmail();
            $mail->to($invite_adr);
            $mail->subject($subject);
            $mail->text($body);
            $mail->from('test@localhost');
            $mail->send();
        }
        $message = '<font color=#ff0000><b>!</b></font>お友達を招待しました<br /><span style="font-size:xx-small">※ケータイの[戻るボタン]で戻って下さい。</span><br />';
        //指定の韓流スターのプロフィール取得
        $sql = <<<SQL
\t\tSELECT `p_name`
\t\tFROM  `h_profile` 
\t\tWHERE  `p_profid` = '{$dec_id}'
SQL;
        $res = $this->index_model->getAll($sql);
        $p_name = $res[0][0];
        if (empty($dec_id)) {
            header("Location: {$domain}");
        }
        if ($dec_id < 10) {
            $decome_id = '000' . $dec_id;
        }
        if ($dec_id > 9 && $dec_id < 100) {
            $decome_id = '00' . $dec_id;
        }
        if ($dec_id > 99) {
            $decome_id = '0' . $dec_id;
        }
        //$smarty->register_outputfilter('sjis_encoding');
        //ini_set("default_mimetype", "application/xhtml+xml");
        //dataのセット
        $data['message'] = $message;
        $data['u_nick'] = $nick;
        $data['p_name'] = $p_name;
        $data['decome'] = $decome_id;
        //loading view
        $this->load->library('Myemoji');
        $this->load->view('headerview');
        $this->load->view('index_deco', $data);
        $this->load->view('footer_ss');
        //$db->disconnect();
        //■招待元の情報取得
    }
コード例 #12
0
ファイル: upload_done.php プロジェクト: ryoueno/RankChannel
            $rec = $stmt->fetch(PDO::FETCH_ASSOC);
            $dbh = null;
            //ヒアドキュメントを使用
            $mailBody = <<<EOT
あなたののランキングに投稿がありました。
【タイトル】
{$y_data['title']}
EOT;
            $mail = new Qdmail();
            $mail->errorDisplay(FALSE);
            $mail->smtpObject()->error_display = FALSE;
            $from = $rec['user_mail'];
            //宛先
            $to = "*****@*****.**";
            //送信元
            $mail->from($from, "RankChannel");
            //宛先名
            $mail->to($to, $user_name);
            //送信元名
            $mail->subject("あなたのランキングに投稿がありました。");
            //件名
            $mail->text($mailBody);
            //本文
            //データを格納する
            $param = array("host" => "ssl://smtp.gmail.com", "port" => 465, "from" => "*****@*****.**", "protocol" => "SMTP_AUTH", "user" => "*****@*****.**", "pass" => "rrrr0611");
            $mail->smtp(TRUE);
            $mail->smtpServer($param);
            $flag = $mail->send();
            if ($flag == TRUE) {
                $smarty->assign("error_flug", "完了");
            } else {