/    Sign up×
Community /Pin to ProfileBookmark

Mail problems

Problem is i want to make the email i send look alot better then it does now.
Here is my current email script

[code]
$to = “[email protected]”;
$subject = “Hardware Request Property $pp”;
$message = ”
Reason Requesting Replacement: $rfr
Make/Model Number: $mk , $md
WDS: $wd
Serial Number: $sn
MAC Address: $ma
IP Address: $ip
Property ID: $pp
Property Contact Name/Title: $ct
Shipping Severity: $sp
Ticket Number : $tt
Comments: $cm
“;
mail ($to, $subject, $message, ‘From: [email protected]’);
[/code]

And this is what the email looks like

[code]
Reason Requesting Replacement: Testing
Make/Model Number: BCEG , BCEG 5.5 dBi
WDS: no
Serial Number: 123654
MAC Address: aa:bb:cc:dd:ee:ff
IP Address: 192.168.0.1
Property ID: 00000
Property Contact Name/Title: Me
Shipping Severity: ground
Ticket Number : 000000
Comments: Testing out this script
[/code]

Now that looks ok just like that i wanted to add some HTML code in to make it look better and add some color.
Problem is when i add the code it just displays the code. example

[code]
<html>
<body>
Reason Requesting Replacement: Testing
Make/Model Number: BCEG , BCEG 5.5 dBi
WDS: no
Serial Number: 123654
MAC Address: aa:bb:cc:dd:ee:ff
IP Address: 192.168.0.1
Property ID: 00000
Property Contact Name/Title: Me
Shipping Severity: ground
Ticket Number : 000000
Comments: Testing out this script
</body>
</html>
[/code]

I have tried to add headers but that didnt help at all. Any advice? Thanks for all this help!!!

to post a comment
PHP

2 Comments(s)

Copy linkTweet thisAlerts:
@prophitauthorNov 26.2006 — Found out the answer to my own question

had to add the headers in
<i>
</i>$headers= 'MIME-Version: 1.0'."rn";
$headers.= 'Content-type: text/html; charset=iso-8859-1'."rn";

Then in my mail command i had to add the $header.

but here was the tricky part. If i added to the end for some reason that didnt work

it had to be before my From.

example...

No go
<i>
</i>mail ($to, $subject, $message, 'From: [email protected]', $header);



Worked great!!!!!
<i>
</i>mail ($to, $subject, $message, $header, 'From: [email protected]');
Copy linkTweet thisAlerts:
@NogDogNov 26.2006 — The "From" string should be added to you additional headers string for the 4th parameter.
×

Success!

Help @prophit spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.17,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...