M
M
Maxim2018-06-20 15:03:46
PHP
Maxim, 2018-06-20 15:03:46

How to change Content Type when mailing via PHP Mailer?

In the file PHPMailer.php - there are settings:
public $CharSet = 'windows-1251';
public $ContentType = 'text/html';
public $Encoding = '8bit';
Parameter $AltBody - empty
For any value of CharSet and ContentType - the message headers contain:
Content-Type: multipart/alternative;
boundary="b1_PMNo9JZh3v4PoBsn2yIPsWqMOXjn96sqY89wzLVHkA0"
How to change to text/html for example?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
W
Wexter, 2018-06-20
@Wexter

$mail->IsHTML(true);

M
Maxim, 2018-06-20
@MaxLucky

Already there:
$mail->MsgHTML($message);
$mail->IsHTML(true);

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question