Codeigniter というPHPのフレームワークを用いて、WEBからメール送信を行っています。
このとき、特定のメーラー(メールソフト)で受信をした際に、大惨事的な文字化けを引き起こしてしまいます。
おそらく、Outlookかなと推察してます。
その他のメーラでは特段の問題は起こってはいません。
エンコードの問題でしょうか?
ヘッダの問題でしょうか?
メール送信の仕組みはマニュアルをコピペする感じで作成しています。
private function Send_Reply_Mail($conv){ //SESSIONデータ $session_array = array(); $session_array = $this->session->all_userdata(); //POSTデータ $post_array = array(); $post_array = $this->input->post(); //reply_toのアドレス設定 $this->email->reply_to("reply@hoge.jp"); //fromのアドレス設定 $this->email->from("from@hoge.jp"); $bcc = $post_array["bcc"]; $bcc = explode(",", $bcc); array_push($bcc,"bcc@hoge.jp"); //bccのアドレス設定 $this->email->bcc($bcc); //タイトル $this->email->subject($post_array["subject"]); //toのアドレス設定 $this->email->to($conv["email"]); //メールのメッセージ内容 $message = $this->Set_Message($post_array["contents"],$conv["name"]); //メッセージの設定 $this->email->message($message); //送信成功 if($this->email->send()){ //DBに完了登録 $this->contact->Finish_Send_Reply_Mail(); //権限により振り分けるメニューのテンプレートファイル $template_array = array(); $template_array = $this->array_constant->template_array(); $template = $this->common->Set_Template($template_array,$session_array); $data["title"] = "お問い合わせ返信(完了)"; //HeaderのVIEW $this->load->view('/header/admin/ha013',$data); //MenuのVIEW $this->load->view('/admin/menu/'.$template,$data); $this->load->view('/admin/contact/contpl_008',$data); }else{ //メール送信失敗時の処理(管理者にメール送信を行う) //fromのアドレス設定 $this->email->from($array["from_mail"]); //reply_toのアドレス設定 $this->email->reply_to($array["from_mail"]); //タイトル $this->email->subject("メール送信失敗。管理番号[".$session_array["reply_mail_id"]."]"); //toのアドレス設定 $this->email->to("to@bar.jp"); //メールのメッセージ内容 $message = $this->Set_Message_For_Admin(); //メッセージの設定 $this->email->message($message); $this->email->send(); //権限により振り分けるメニューのテンプレートファイル $template_array = array(); $template_array = $this->array_constant->template_array(); $template = $this->common->Set_Template($template_array,$session_array); $data["title"] = "お問い合わせ返信(失敗)"; //HeaderのVIEW $this->load->view('/header/admin/ha013',$data); //MenuのVIEW $this->load->view('/admin/menu/'.$template,$data); $this->load->view('/admin/contact/contpl_013',$data); } }
対処方法をご存知の方がいらっしゃいましたら教えて頂ければと思います。
回答3件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。