Page 1 of 1
php forms and html email
Posted: Sat Aug 17, 2002 8:18 pm
by Supershuffle
I have enjoyed using php for handling forms and mailing on web sites, however I have been researching a solution for a different twist on the use of forms.
A client asked me i I could design an html email that would thank his customers and also perform a survey and upon submission send an email to him.
I have little experince with html emails, but I am inclined to think that sending variable data back would be problimatic without some for of datahandling by a webserver.
I have the html version of the form, however I was curious if anyone has any advice for me on wrapping it in an email?
Thanks in advance,
Jamie Keefer
Posted: Sun Aug 18, 2002 4:52 am
by aaronhall
I must have ADD or something because I lost you half way down. You are trying to just do a survey and email it to someone? Doesn't seem right since you would already be doing about the same thing with the other submission forums. Clarify for me, brother.
-Aaron
Posted: Sun Aug 18, 2002 5:41 am
by Zeceer
You're going to send customers a mail that say thanx for you order something? And a mail to the boss with the information the customers filled out?
If so, I believe you can use the mail() function more time?
http://www.php.net/manual/en/function.mail.php
Posted: Sun Aug 18, 2002 11:15 am
by twigletmac
If you want them to do a survey give them a link to a web page with some id that identifies them in the query string.
Mac
More clarification
Posted: Sun Aug 18, 2002 7:57 pm
by Supershuffle
It's hard for me to describe these things sometimes, sorry.
Let me try and put it this way.
I want to use Twigletmac's method, for one it's the only way I can think of to do it. That's the way it seems most surveys I get as email work. You receive a thank you email and a link to fill out a survey passing a value as a parameter in the URL.
The above is the only way I can think to send a variable from an email.
Recently I recieved an email that had two FORM textfield inputs. One field was labeled Area Code and the other was the prefix for a telephone number (the first three numbers). I saw this and was thinking, so they are sending user input back through this email. I entered some numbers and tried it. I got a listing of long distance carriers that supposedly were specific to my area. My first thought was, either I don't know how they are doing this or is this just a marketing ploy to make the email more interactive. I went back to my first thought and started wondering, is that possibe?
Is it possible to send FORM input back through an email?
If someone can help with that question, that would be a step in the right direction and would help me with this perplexing problem.
Thanks
EDIT:
I will be using the method Twigletmac suggested, but need to get to the bottom of this.

Posted: Mon Aug 19, 2002 9:59 am
by mikeq
So are you saying you want to attach an .html file to the email, the user fills it in off-line and then sends it in an email back to you?
<cont.>
Posted: Tue Aug 20, 2002 12:35 pm
by Supershuffle
The html would appear as the body of the email.
Edit: here is a company that offers services to manage an html email marketing campaign, for reference:
http://www.html-email-marketing.com/
Trying to figure out still the limitations of html email...thanks everyone for your help

Posted: Tue Aug 20, 2002 12:44 pm
by llimllib
You can do it, as long as the client has a recent, graphical, email client. Just send 'Content-Type: text/html' as one of the headers, and it should function exactly like any other webpage - forms and all.
Posted: Tue Aug 20, 2002 12:48 pm
by Supershuffle
Woohoo! Thanks! That makes sense.
THe question is, how many people have html capable mail programs AND have it turned on.
I am gonna go try and mess around with it...thanks again...
Jamie Keefer
Posted: Tue Aug 20, 2002 1:22 pm
by llimllib
therein lies the rub. However, you can have the email program decide which email to show - the text or the html. Here's an example (a fine spam from cbs.com:)
Code: Select all
Received: from mailer05.sportsline.com (ї64.30.226.129]) by mc1-f9.law16.hotmail.com with Microsoft SMTPSVC(5.0.2195.4905);
Tue, 13 Aug 2002 10:34:15 -0700
Received: (qmail 27845 invoked by uid 502); 13 Aug 2002 05:29:11 -0000
Date: 13 Aug 2002 05:29:11 -0000
Message-ID: <20020813052911.27842.qmail@mailer05.sportsline.com>
From: "CBS SportsLine.com" <6810877_615_1@mailer.sportsline.com>
Reply-to: "CBS SportsLine.com" <6810877_615_1@mailer.sportsline.com>
To: juegajedrez@hotmail.com
Subject: Free Tailgate Chair Offer for MLB Fans!
Content-Type: multipart/alternative; boundary=____________________________Next
Return-Path: mailer@mailer05.sportsline.com
X-OriginalArrivalTime: 13 Aug 2002 17:34:15.0908 (UTC) FILETIME=їA5621240:01C242EF]
--____________________________Next
Content-Type: text/plain
*****************************************************************
To view the COLOR version of this message, or if the links below
do NOT work properly, click here:
http://www.sportsline.com/u/newsletter/mailings/mail615_1.html?6810877
*****************************************************************
=================================================
A SPECIAL OFFER
brought to you by CBS SportsLine.com
=================================================
Dear MLB Fan,
<!-- snip by Bill Mill - plain text email continues until: -->
--____________________________Next
Content-Type: text/html
<html>
<head>
<TITLE>MBNA Excllusive </TITLE>
<style>
<!-- Snipped by bill mill - HTML continues -->
</html>
<!--Deployed By yelvyp 8.12.2002 15:7:7 Log#:20020812150705_989_yelvyp-->
--____________________________Next--
Well now I can get a good nights sleep =)
Posted: Tue Aug 20, 2002 2:20 pm
by Supershuffle
You have been a great help. I can not thank you enough.
I see you are from philly, my home town. GO EAGLES!!
Peace
Jamie Keefer
Posted: Tue Aug 20, 2002 2:26 pm
by llimllib
nope, just go to school in philly. I'm from connecticut. GO GIANTS!

=)
Posted: Tue Aug 20, 2002 2:29 pm
by Supershuffle
HAHAHA...right on!
It's gonna be a fun season...I hope =/
Posted: Tue Aug 20, 2002 2:32 pm
by llimllib
unfortunately, probably more fun for an eagles fan than a giants one this year, but who knows...