/    Sign up×
Community /Pin to ProfileBookmark

Hi everybody..

I used to put a specific code for html email…and that code has not created any problem before.I got the email in html format.

But recently I used the same code for another domain……but here the server is sending plain/text formatted email.

here is the code:

[code=php]$to = “[email protected]”;
$from = “[email protected]”;
$subject = “Form details:::”;
$message = ”
<html>
<body bgcolor=”#ffffff”><font face=”arial”>
Here is the form details:<br><br>
$content <br><br>
$con
</font>
</body>
</html>
“;
$headers = “From: $fromrn”;
$headers .= “MIME-Version: 1.0rn”;
$headers .= “Content-type: text/html; charset=iso-8859-1rn”; $success2 = mail($to, $subject, $message, $headers);[/code]

I used the above code in several domains and worked…but in one domain it is sending in plain text.

I think the webserver(*nix platform) doesnt support html email or something else.I really dont know what is the problem behind this strange behaviour.I have tested the same code in another server there it is running nicely.

PLease suggest me….Thanks in advance…Raj.

to post a comment
PHP

0Be the first to comment 😎

×

Success!

Help @raj_2006 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 4.28,
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: @Yussuf4331,
tipped: article
amount: 1000 SATS,

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

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...