$ this-> load-> library( 'email');
$ this-> email-> reply_to($ this-> input-> post( 'email')、$ this-> _ mail_encode($ this-> input-> post( 'name')、“ utf-8”)) ;
$ this-> email-> from($ this-> input-> post( 'email')、$ this-> _ mail_encode($ this-> input-> post( 'name')、“ utf-8”)) ;
$ this-> email-> to($ email);
$ this-> email-> subject($ this-> _ mail_encode(“ test.ruからのメッセージ”、“ utf-8”));
$ this-> email-> message($ this-> input-> post( 'message'));
$ this-> email-> send();
コントローラーに含まれるメソッドが使用されます。
function _mail_encode($テキスト、$エンコード){
$ result = "=?"。$ encoding。 "?b?"。base64_encode($ text)。 "?=";
return $ result;
}
スクリプトからのメール送信に関する詳細: http : //habrahabr.ru/blog/webdev/32489.html