検索条件
全27件
(2/6ページ)
$to ="address@exmaple.com";
$template_filename = 'docomo4_0.dmt';
$template = file_get_contents($template_filename);
qd_send_mail('DecoTemplate',$to,'テンプレートテスト',$template,'from@example.com');
これでドコモのデコメテンプレートの内容をいったんデコードした上で、address@exmaple.comにデコメールを送信します。
qd_send_mail('DecoTemplate',$to,'テンプレートテスト',$template,'from@example.com');
の代わりに$mail -> easyDecoTemplate($to,'テンプレートテスト',$template,'from@example.com');でも、構いません。
Docomo,au,Softbankのデコメテンプレート。インラインHTMLメール(MHTML)。通常のHTMLメール。テキストメール↓
Docomo,au,Softbankの各デコメテンプレート
include('qd_mail_receiver.php');として明示的に読み込んで下さい。
$file = 'templatefile.dmt';
$mail = & new Qdmail();
$content = file_get_contents($file);
$au_template = $mail -> makeDecoTemplate('TPL_AU',$content);
PHP5では、newの前の & は必要ありません。| 'TPL_DC' | ドコモ用テンプレート |
| 'TPL_AU' | au用テンプレート |
| 'TPL_SB' | SoftbankMobile用テンプレート |
$return = array(
'sizeBody'=>null,
'smtpData'=>null
);
$before = array(
'charset'=>array('utf-8','base64'),
'logLevel'=>1
);
$type = 'text';
$option = array( 'type'=> $text , 'option'=>$before , 'return' =>$return );
$ret = qd_send_mail(
$option ,
'address@example.com',
'タイトル',
'本文',
'from@example.com'
);
$ret は、第1引数の$opiton のキーreturn が設定されていない場合は、メール送信ができたらtrue,エラーだった場合はfalseを返します。
Array
(
[type] => text
[option] => Array
(
[charset] => Array
(
[0] => utf-8
[1] => base64
)
[logLevel] => 1
)
[return] => Array
(
[sizeBody] => 12 //例示
[smtpData] => '(ヘッダー+本文データ)'
[qd_send_mail] => true
)
)
キーqd_send_mailには、問題がなかった場合はtrue,エラーがあった場合には、falseが返されます。
$before = array(
'charset'=>array('utf-8','base64'),
'logLevel'=>1,
'renderMode'=>true
);
$mail -> renderMode( true );qd_send_mail()モードでは、
$option = array( 'renderMode'=>true ); $type = array( 'type'=>'text' , 'option' => $option ); qd_send_mail( $type , $to , .......);となります。