Formatting Data in E-mail

Jimmy Changa's picture

They have: 220 posts

Joined: Mar 2003

Yes, it's been quite a while since I've come around, but I thought a stupid question was long overdue on my part...

I have made a few online forms for a particular client using PHP form mail. This script I'm using sends the data in what I consider easy to read one line per unit of data (whether it's radio, checkbox or text). This customer is now asking me to see if there is a way for the e-mails to come across looking exactly the same as the filled in form.

Is this possible?

:flame: :smokin:

Suzanne's picture

She has: 5,507 posts

Joined: Feb 2000

Sure, you can send them HTML emails. Smiling

Alternatively, you can add lots of tabs. Got an example?

Jimmy Changa's picture

They have: 220 posts

Joined: Mar 2003

A recent form example is: http://www.bistaterubber.com/weigh_feeder_ws.html

They want to open the e-mail and see the same form filled in. :^)

Suzanne's picture

She has: 5,507 posts

Joined: Feb 2000

Have you tried sending an HTML email? You may need to set some details in the header (last section of the mail function).

$body = "";

mail($to,$subject,$body,$extraheaders)

??

You'd have to look up the specific headers for HTML email, likely from an HTML email itself.

Jimmy Changa's picture

They have: 220 posts

Joined: Mar 2003

Hmmm, well I will have to play around with that a bit. Thanks for pointing me in what is hopefully the right direction. Smiling

mairving's picture

They have: 2,256 posts

Joined: Feb 2001

Keep in mind too that not everyone can read HTML emails. A few people have email clients that would read it as text. Some others like AOL, particularly the older versions will mangle the html and make it unreadable. Just make sure to use full paths to point back to stylesheets or images.

Mark Irving
I have a mind like a steel trap; it is rusty and illegal in 47 states

They have: 461 posts

Joined: Jul 2003

i like your tag mark.

fyi: in the form you send, it may be good to use the readonly attribute

Jimmy Changa's picture

They have: 220 posts

Joined: Mar 2003

They use Outlook as thier e-mail client. I "assume" it knows how to read HTML...lol And as for styles and images...embeddding styles and NOT using images should help. Smiling

Suzanne's picture

She has: 5,507 posts

Joined: Feb 2000

Jimmy Changa's picture

They have: 220 posts

Joined: Mar 2003

Thanks...this does look enlightening. I just might be able to pull this off....eventually. Smiling

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.