Jump to content

Add font in PHPmailer

Go to solution Solved by jazzman1,

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

  • Solution

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.

Edited by jazzman1
Link to comment
Share on other sites

This thread is more than a year old. Are you sure you have something important to add to it?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • 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.