HTMLメール

2008/08/02 未分類 spok

qd_send_mailでHTMLメール

基本的には、qd_send_mailでのテキストメールの送信方法と同じです。
'text'という指定を'html'と変更するだけです。

ここでは、サンプルコードのみを記します。

サンプルコード

添付ファイルを送る場合

$to = array( 'address@example.com' , '宛先日本語名' );
$from = array( 'from@example.com' , '送り元日本語名' );
$subject = 'HTMLメールのテスト(テキスト)';
$body = '<html><body bgcolor="#eeeeff"><p>ここに本文を書きます。
</p><span style="color:red;font-weight:bold;">
さまざまな装飾をすることが可能です。
</span></body></html>';

$attach = array( 'test.jpg' , '添付フィル.jpg');

qd_send_mail( 'html' , $to , $subject , $body , $from , $attach);