<?php include 'Mail.php'; include 'Mail/mime.php' ; $text = 'Text version of email'; $html = '<html><body>HTML version of email</body></html>';
本文にテキストを使って記述する代わりにHTML文を記述することができます。Mail_Mimeクラスで用意されている「setHTMLBody」メソッドを使います。
The Mail_Mime class provides an OO interface to create MIME enabled email messages. This way you can create emails that contain plain-text bodies, HTML bodies, ...
Using PEAR::Mail_Mime, it's easy to add HTML to emails, and even to embed images within the document. This class will automatically determine whether or not you ...
<?php /** * The Mail_Mime class is used to create MIME E-mail messages * * The Mail_Mime class provides an OO interface to create MIME * enabled email ...
複雑なマルチパートメールの作成を容易にするパッケージです。 あなたが、電子メールを作成するための単純なAPIを捜しているなら、 Mail_Mimeクラスは恐らく十分で ...
HTMLメールを使う場合にHTMLメールの中で画像を使用する場合は使用する画像ファイルをMail_Mimeクラスで用意されている「addHTMLImage」メソッドを使って指定します。
Description. text/html/image/attachment を追加した際には、この関数をコールしなければなりません。 この関数は、メッセージを構築してそれを返します。
PEAR Mail_Mimeを使うとHTMLメールも送ることができます。リスト1を見てください。18〜21行目でHTMLのIMGタグで使用する画像ファイルを3種類指定しておきます。
<?php // ライブラリを読み込む。 include 'Mail.php'; include 'Mail/mime.php'; $host = '{SMTPサーバー}'; $port = '586'; $username = '{ユーザーID}'; ...