View Full Version : Need code to embellsih mailto parameters...
tignerm
02-20-1999, 10:50 AM
I have some basic code so someone can click to sned me email. Is there a way via code to automatically fill in the Subject line too, so when thay click, it fills in my email address AND fills the Subject line?
Thanks!
hearts
02-20-1999, 10:54 AM
yup... quite easy actually.. http://www.aota.net/ubb/smile.gif
email us
tignerm
02-20-1999, 11:05 AM
Hearts - thanks. OK, that WAS easy. Is there a way to add to the body too? Thx in advance!
Armand
02-20-1999, 01:46 PM
Hearts you are pretty much on target as far as I can tell in your answer. My only extra comment would be that first off not all browsers and e-mail programs support the subject line thing.
And given the context of tignerm's post I would say use a cgi mail form too.
***from someone who's looking to add about 250 mail forms to his website in a week or so***
Justin
02-20-1999, 06:58 PM
Use PHP3. Make a file, call it mail.shtml and put this in it:
<form action="mail.php3" method=post>
<input type=hidden name="IP" value="<!--#echo var="REMOTE_ADDR" -->">
Name:
<input type=text size=30 name="Name">
Email:
<input type=text size=30 name="Email">
Subject:
<input type=text name="Subject" size=30>
Message:
<textarea rows=10 cols=40 name="Message">
</textarea>
<input type=submit value=" Send Message ">
<input type=reset value=" Clear Form ">
</form>
Then make a file called mail.php3, and inside it you can place all the HTML you want, and add this:
<?
$To = "WebMail@VDJ.Net";
$From = $Name . "<" . $Email . ">";
$Content = "Web message from " . $Name . " at " . $Email;
$Content .= "\nIP Address: " . $IP;
$Content .= "\nSubject: " . $Subject . "\n\n-------------\n\n";
$Content .= $Message . "\n\n--------------\n\n";
mail($To, "Web Mail - RE: " . $Subject, $Content, "From: " . $From . "\nReply-To: " . $Email);
?>
That's taken from my Contact page, and the added benefit is that you can add whatever you want to the subject, body, etc, and use their address for the Reply-To, so you can just reply to it. Also, it doesn't require that they have an email account. Less hassel.
My contact page is at http://www.vdj.net/contact.shtml
Hope that helps http://www.aota.net/ubb/smile.gif
PS - we really need the [CODE] tag here!!
------------------
Justin Nelson, SFE Inc.
www.vdj.net (http://www.vdj.net)
[This message has been edited by Justin (edited 02-20-99).]
hearts
02-20-1999, 07:16 PM
JUSTIN.. that is beautiful. http://www.aota.net/ubb/smile.gif
I wanna know how to do that..
is there anything you don't know how to do?? *impressed*
all that PHP code reminds me of perl. *is that a coincidence?* (hope spelling doesn't count! http://www.aota.net/ubb/wink.gif )
-----
hearts
[This message has been edited by hearts (edited 02-20-99).]
hearts
02-21-1999, 12:06 AM
Hi Mike...
Honestly.. I do not know the answer to that question. This would be my guess
I would believe that there isn't, and that if you wanted anything included in the body of an outgoing email from a web site, that you would need to set up a mail form, which you can set up from AOTA. (i will come back and edit this post with the URL.)
----- edit -----
http://www.aota.net/CNC/Mail.shtml
---- end edit ----
you can add to the fields and such.
but MY QUESTION IS...
why do you want a prewrote email?
or are you wanting certain info being sent to you or your client?
If you are seeking specific info, and you are with FQ, then my suggestion again, is the Mail Form that is available from AOTA.
DEB.. or Andrew.. if you are there lurking.. if I gave this guy the wrong info.. would ya please correct me?
------
thanks.. and I hope I am right.
hearts
[This message has been edited by hearts (edited 02-20-99).]
vBulletin® v3.6.8, Copyright ©2000-2013, Jelsoft Enterprises Ltd.