Geir, thanks for replying, and please, get some sleep, then reply :))
Can't ask the user for their mail preferences, since most don;t know. So assume we have to send MIME for HTML and TXT and they receive whatever their browser wants to get ....
As for the content of the mail, just ASSUME I will create a complete HTML file (and a complete TXT file) called "file1" (either .html or .txt) to be read in as $msg. I have no problem composing those files, what I am not sure of is the code to "send-mail" those files using PHP. The files are just what the user will see on screen, nothing more, nothing less, so I'm not sure how to send it.
Thanks for replying, I MUCH appreciate it !!!! How is the weather in N.E. Europe ?? In the west U.S here, it is hot and dry, too hot, and there are many bushfires -- definite proof of global warming !!! Cheers....
Main Topics
Browse All Topics





by: geir_andersenPosted on 2005-06-22 at 21:26:00ID: 14281456
I'll do my best to help you.
I'll have to write some code a bit later (I'm just not really awake yet) and post here, but I'll give you a pointer..
You don't need to create files. We just use variables in the script to hold both the html email-message and text email-message.
>>Please post a complete routine to choose which file is relevant, and how to read in each file to mail() it to the recipien
Well, PHP can't decide wheter an end-user can accept html or text email messages.
The only way to do that is to make recipients sign up and choose what format they want mail in. Then store that in a database and send the email type based on info from the database.
If you don't know what each user can accept, then you have to revert to sending in one format, I'm afraid.
Also, I/we can't write functioning code ready for you to use since we don't know how your form looks, how you want the mail to look or anything for that matter.. But I'll write and example HTML form with a few fields, then some PHP code that'll extract variables from that HTML form and send that in an email, so you get an idea.
-Geir