Jump to content

Add font in PHPmailer


Yann63
Go to solution Solved by jazzman1,

Recommended Posts

Hello

 

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

 

 

require("class.phpmailer.php");

$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->FromName=$_POST['NAAM'];
$mail->Sender=$_POST['EMAIL'];

$mail->AddAddress("webmaster@blackfeet.be");
$mail->Subject = $subject;

$mail->Body = $text;

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

if(!$mail->Send())
{
 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. Please don't revive it unless you have something important to add.

Join the conversation

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

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