How to send HTML EMail.?

the mail() function

Moderators: macek, egami, gesf

vimalpatel87
New php-forum User
New php-forum User
Posts: 5
Joined: Tue May 08, 2012 9:23 pm

How to send HTML EMail.?

Postby vimalpatel87 » Tue May 08, 2012 9:26 pm

..
Last edited by vimalpatel87 on Thu May 10, 2012 3:33 am, edited 1 time in total.

vimalpatel87
New php-forum User
New php-forum User
Posts: 5
Joined: Tue May 08, 2012 9:23 pm

Re: How to send HTML EMail.?

Postby vimalpatel87 » Tue May 08, 2012 9:28 pm

anyone there.??

User avatar
Nullsig
php-forum Fan User
php-forum Fan User
Posts: 981
Joined: Thu Feb 17, 2011 6:52 am
Location: Racine, WI

Re: How to send HTML EMail.?

Postby Nullsig » Wed May 09, 2012 4:04 am

So you know how to send e-mail with PHP that isn't formatted in HTML?

You will need these headers to notify a e-mail client that there is HTML in the message.

Code: Select all

$headers .=  'X-Mailer: PHP/' . phpversion() . "\n";
$headers  .= 'MIME-Version: 1.0' . "\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
                  
mail($to,$subject,$message,$headers);


vimalpatel87
New php-forum User
New php-forum User
Posts: 5
Joined: Tue May 08, 2012 9:23 pm

Re: How to send HTML EMail.?

Postby vimalpatel87 » Wed May 09, 2012 4:56 am

I want to send HTML Email with PHP..anyone can guide me.?I want to send HTML Email with PHP..anyone can guide me.?I want to send HTML Email with PHP..anyone can guide me.?I want to send HTML Email with PHP..anyone can guide me.?I want to send HTML Email with PHP..anyone can guide me.?I want to send HTML Email with PHP..anyone can guide me.?

User avatar
Nullsig
php-forum Fan User
php-forum Fan User
Posts: 981
Joined: Thu Feb 17, 2011 6:52 am
Location: Racine, WI

Re: How to send HTML EMail.?

Postby Nullsig » Wed May 09, 2012 5:19 am

Okay that was childish. I have helped you on both of your posts and this is how your react.

You have failed to fully define your problem in general.

If you came here expecting us to hand you code to do your job for you, then you came to the wrong place.

You describe your problem as:
I want to send HTML Email with PHP


That could translate to any of these following problems:
-"I need to learn how to use PHP to send an E-mail."

-"I know how to send E-Mail with PHP but I need to send HTML content, how do I do that?"

-"I need to know how to set up a "Contact Us" form to send e-mail."

-"My professor wanted me to learn how to send e-mail and I am too lazy to open a book."

-"I own a company and decided that the web developer cost too much money so I though I would go it alone. Would you like to be my unpaid developer?"

User avatar
egami
php-forum GURU
php-forum GURU
Posts: 2196
Joined: Wed Oct 06, 2010 11:19 am
Location: Happy Valley, UT

Re: How to send HTML EMail.?

Postby egami » Wed May 09, 2012 5:35 am

hah.. gotta love it


Return to “PHP coding => Mail”

Who is online

Users browsing this forum: No registered users and 2 guests