Jump to content

[SOLVED] PHP simple email problem


SocomNegotiator

Recommended Posts

This email is supposed to be sent to who I say when an order is completed. Now for some reason when I put HTML into the message body it just shows up as normal text in my actual email. Does anybody know how to fix this problem?

 

Code:

<?php
$to = "[email protected]";
	$subject = "You have recieved a new order online from {$userinf['company_name']}";
	$message = "<p>{$userinf['contact_name']} from {$userinf['company_name']} has just submitted an order online.<br /></p>";
	$from = $user->inf['email'];
	$headers = "From: $from";
	mail($to,$subject,$message,$headers);?>

 

When I go to my email it shows this:

<p>John from Costco has just submitted an order online.<br /></p>

 

I don't know why it shows the HTML in the email...any help would be much appreciated.

Link to comment
https://forums.phpfreaks.com/topic/116359-solved-php-simple-email-problem/
Share on other sites

try....

$message = '<p>{$userinf['contact_name']} from {$userinf['company_name']} has just submitted an order online.<br /></p>';

 

single quote rather then double.

 

Regards ACE

 

 

It still does it no matter if I put single or doubles quotes

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.