Welcome Guest, Not a member yet? Register   Sign In
Japanese (multi-byte) characters & email library
#6

[eluser]Unknown[/eluser]
Hello

This is code for send mail in Japanese language.

$
Code:
this->load->library('email');

        mb_language("Japanese");
        mb_internal_encoding("SHIFT-JIS");
        
        $subject = 'パスワードお知らせ';
        $message = 'パスワード再発行。';
        
        $name = "管理者";
        $name=mb_convert_encoding($name,'iso-2022-jp', 'SHIFT-JIS');
        $name='=?iso-2022-jp?B?'.base64_encode($name).'?=';
        
        $subject=mb_convert_encoding($subject,'iso-2022-jp', 'SHIFT-JIS');
        $subject='=?iso-2022-jp?B?'.base64_encode($subject).'?=';
    
        $this->email->to('[email protected]');
        $this->email->from('[email protected]',$name);
        
         $this->email->subject($subject);
        $this->email->message($message);
        $this->email->send();


Messages In This Thread
Japanese (multi-byte) characters & email library - by El Forum - 08-09-2007, 03:15 AM
Japanese (multi-byte) characters & email library - by El Forum - 08-09-2007, 04:36 AM
Japanese (multi-byte) characters & email library - by El Forum - 08-09-2007, 05:11 PM
Japanese (multi-byte) characters & email library - by El Forum - 08-09-2007, 07:34 PM
Japanese (multi-byte) characters & email library - by El Forum - 08-09-2007, 08:10 PM
Japanese (multi-byte) characters & email library - by El Forum - 08-09-2007, 10:58 PM
Japanese (multi-byte) characters & email library - by El Forum - 03-14-2008, 01:21 PM



Theme © iAndrew 2016 - Forum software by © MyBB