4
私はtext/htmlフォーマットの収入電子メールのコンテンツタイプをクライアント/ユーザマシンのデフォルトのフォントスタイルとサイズに設定していると仮定しています。 User Pear Mailコンテンツタイプにどのように追加しますか?私が送ったすべての例では、MIMEタイプの添付ファイルでコンテンツタイプを追加することしか示していません。郵便受けにコンテンツタイプを追加
また、メールクライアントのフォントスタイルとサイズをデフォルトにする別の方法がある場合、私はそれを知りたいと思います。
はこの作品
$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
現在のメールコード
$from = "[email protected]";
$to = $SendTo;
$subject = "Contact : " . $uxGlobalLocation;
$body = $Bodycopy;
$host = "mail.set.co";
$username = "[email protected]";
$password = "empty00";
$headers = array ('From' => $from,
'To' => $to,
'Subject' => $subject);
$smtp = Mail::factory('smtp',
array ('host' => $host,
'auth' => true,
'username' => $username,
'password' => $password));
$mail = $smtp->send($to, $headers, $body);
if (PEAR::isError($mail)) {
echo("<p>" . $mail->getMessage() . "</p>");
} else {
header ('Location: /');
exit();
}
EDIT可能な答え
$headers = array ('From' => $from,
'To' => $to,
'Subject' => $subject,
'Content-Type' => 'text/html; charset=iso-8859-1',
'MIME-Version' => '1.0');