Jump to content

Add font in PHPmailer


Recommended Posts



How can I add a specific font and fontsize to my mail body ?




$mail = new PHPMailer();

$mail->IsSMTP(); // Laat PHPMailer gebruik maken van een smtp server.

$mail->Host = "smtp.mijnhostingpartner.nl"; // SMTP server van Mijn Hosting Partner

$mail->SMTPAuth = true;

$mail->Username = 'webmaster@blackfeet.be'; // Een geldig emailadres wat aangemaakt is bij Mijn Hosting Partner
$mail->Password = 'yr2805'; // Het wachtwoord wat bij het emailadres hoort


$mail->Subject = $subject;

$mail->Body = $text;

$mail->IsHTML(true); //Opmaak van de email is in HTML

 echo "Error sending: " . $mail->ErrorInfo;;

echo '<META HTTP-EQUIV=Refresh CONTENT="0; URL='.$url.'">';


Link to comment
Share on other sites

When you're trying to send emails as html document use only inline css, something like:

<p style="color: red;">Your Text</p>

@pbs, as I can see the Body is a property and should treat a css as a text, I think this is wrong but....I've never used phpMailer before and not sure.

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.