How do I sent content of a PHP form via HTML email?
For example, fields $name, $city, $state, $phone, $location
to HTML:
<p>Congratulations $name from $city, $state with the phone # $phone .
You now get an expense paid trip to $location .
And that HTML outputted in email..so someone checks their email,they
have an HTMl certificate generated from a form in PHP. 4 7715
The PEAR Mail_mime module is pretty great for this. It makes generating
even multipart/alternative mail with inline image attachments easy.
Head over to http://pear.php.net
--
Steve Koppelman http://www.hatless.com/ ph**********@hotmail.com wrote: How do I sent content of a PHP form via HTML email?
For example, fields $name, $city, $state, $phone, $location
to HTML:
<p>Congratulations $name from $city, $state with the phone # $phone . You now get an expense paid trip to $location .
And that HTML outputted in email..so someone checks their email,they have an HTMl certificate generated from a form in PHP.
Unfortunately it requires installing Pear, more than I bargained for.
Any other alternative?
sk <st***********@hatless-dot-com-without-the-spam.com> wrote in message news:<nk3kb.579409$Oz4.558595@rwcrnsc54>... The PEAR Mail_mime module is pretty great for this. It makes generating even multipart/alternative mail with inline image attachments easy.
Head over to http://pear.php.net
-- Steve Koppelman http://www.hatless.com/
ph**********@hotmail.com wrote: How do I sent content of a PHP form via HTML email?
For example, fields $name, $city, $state, $phone, $location
to HTML:
<p>Congratulations $name from $city, $state with the phone # $phone . You now get an expense paid trip to $location .
And that HTML outputted in email..so someone checks their email,they have an HTMl certificate generated from a form in PHP. ph**********@hotmail.com wrote: Unfortunately it requires installing Pear, more than I bargained for. Any other alternative?
1. Find an HTML email somewhere in your inbox.
2. View source.
3. Look at how the message is formed.
4. Form a message that resembles it structurally. For the bulk of the
body, "heredoc" syntax is your friend. What you want to do is build the
body as one long string, with the variables you want inserted in the
appropriate places, just like you would if you were making a web page.
Then pay attention to the headers that define it as a MIME message with
HTML contents, as well as any MIME separators in the message itself.
You'll need to add those headers using the API of whatever mail call you
use, and add the in-message separators manually to the body of the message.
5. Send the mesaage.
6. Make sure it arrives and displays properly in a couple of
representative mail programs. Some mail programs are more forgiving of
little MIME mistakes than others.
6. After you do this a few times with convoluted, cranky code to get the
headers and separators working just right, see if you can use PEAR's
Mail_mime in the future. It's installed by default with newer releases
of PHP, and isn't too difficult to install otherwise as long as you have
control over php.ini. If your web host can't or won't support PEAR, ask
yourself why. sk <st***********@hatless-dot-com-without-the-spam.com> wrote in message news:<nk3kb.579409$Oz4.558595@rwcrnsc54>...
The PEAR Mail_mime module is pretty great for this. It makes generating even multipart/alternative mail with inline image attachments easy.
Head over to http://pear.php.net
-- Steve Koppelman http://www.hatless.com/
ph**********@hotmail.com wrote:
How do I sent content of a PHP form via HTML email?
For example, fields $name, $city, $state, $phone, $location
to HTML:
<p>Congratulations $name from $city, $state with the phone # $phone . You now get an expense paid trip to $location .
And that HTML outputted in email..so someone checks their email,they have an HTMl certificate generated from a form in PHP.
Hello,
On 10/18/2003 01:12 AM, ph**********@hotmail.com wrote: How do I sent content of a PHP form via HTML email?
For example, fields $name, $city, $state, $phone, $location
to HTML:
<p>Congratulations $name from $city, $state with the phone # $phone . You now get an expense paid trip to $location .
And that HTML outputted in email..so someone checks their email,they have an HTMl certificate generated from a form in PHP.
You may want to try this class that lets you compose and send HTML
messages properly: http://www.phpclasses.org/mimemessage
--
Regards,
Manuel Lemos
Free ready to use OOP components written in PHP http://www.phpclasses.org/ This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Francois Keyeux |
last post by:
hello everyone:
i have a web site built using vbasic active server scripting running on
iis (it works on either iis 50 and 60, but is designed for iis 50)
i know how to create a plain text...
|
by: ColinWard |
last post by:
Hi. I have the following code in a module which sends email via Outlook.
Option Compare Database
Option Explicit
' Declare module level variables
Dim mOutlookApp As Outlook.Application
Dim...
|
by: VB Programmer |
last post by:
My company has it's own webserver, which is going to host our ASP.NET web
application. We want the website to be able to send out emails.
1. What do I need on the server so that it has the...
|
by: Rene |
last post by:
Hi all
i need some help. i try to send mail with the following code.
Private Sub LinkButton1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LinkButton1.Click
Dim...
|
by: Anuradha |
last post by:
Dear All
How can i send mails using vb.net
Thanx all
|
by: Roger Withnell |
last post by:
I'm sending Russian text in an email generated from the website which
displays in the email as ??????????
The website is set to codepage 65001 and the charset to utf-8.
Please advise.
...
|
by: Ray Booysen |
last post by:
Hi all
I'm sending email via ASP.NET in HTML mode. Each email has exactly one
attachment and I do have full access to the SMTP server. However, if I
send the email in HTML format, the...
|
by: HenHouse |
last post by:
Hi folks;
I have a pretty simple problem which is proving tricky to solve... I have a form that displays various contact information about an individual, and one of these items of information is an...
|
by: lstanikmas |
last post by:
Hi, I'm validating a form with this ASP but receiving some blank email
responses; does anyone see anything wrong with it?:
function isFormVarExcluded(thisForm, strToCheck)
{
var strExcludeVars...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
| |