Jump to content

is it possible (decorate and email)


deansaddigh

Recommended Posts

i have this

//Send an email
		$headers = "Reply-To: [email protected]\r\n";
		$headers = "Return-Path: [email protected]\r\n";
		$headers = "From: [email protected]\r\n";
		if (mail($email, $subject, $message, $headers)) 
		{
		  echo("<p>Message successfully sent!</p>");

 

Is it possible to decorate the email , so it looks nice when it goes to the customer?

Link to comment
https://forums.phpfreaks.com/topic/203006-is-it-possible-decorate-and-email/
Share on other sites

You can send HTML email, but it's a pretty hokey system as mail clients are even more varied than browsers. So it's pretty difficult to get it to look proper in all mail clients, and some of them can't even read HTML mails in the first place.

 

But here is some reading to get your started:

 

 

$headers = "Reply-To: [email protected]\r\n";

$headers = "Return-Path: [email protected]\r\n";

$headers = "From: [email protected]\r\n";

 

You realize you overwrote the value of $headers 3 times and $headers now contains "From .." The proper format would be:

 

$headers  = "Reply-To: [email protected]\r\n";

$headers .= "Return-Path: [email protected]\r\n";

$headers .= "From: [email protected]\r\n";

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.