Jump to content

Add font in PHPmailer


Yann63

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 = '[email protected]'; // 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("[email protected]");
$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
https://forums.phpfreaks.com/topic/278378-add-font-in-phpmailer/
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.

Archived

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.