FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


E-mail me button help





bladesage
I just have a quick question:

I am using a button to have my visitors send me an e-mail with a custom subject.

Code:

<script type="text/javascript">

function mailme()
{
window.location = "mailto:bladesage@sbcglobal.net?subject=Error report&cc=bladesage@sbcglobal.net";
}


I guess my real question would be, is there a way to specify what the body of the e-mail will contain?

I know I can specify who it's to, the subject, and CC, but I need to know how to set the body text.

____________________________________________________________________________________

By the way, is there a way to have a form send it to my e-mail address in HTML format? I got the forms to send it to me in text/plain, but could I do it in HTML instead?
Traveller
Supposing you have the body text stored in a variable named "BodyText":

".....&body=" + escape(BodyText);
bladesage
Traveller wrote:
Supposing you have the body text stored in a variable named "BodyText":

".....&body=" + escape(BodyText);


That could probably help.

But do you know if there's a way to mail form values in html format?
Traveller
bladesage wrote:
But do you know if there's a way to mail form values in html format?


If "BodyText" is the name of a form input, that would work, but what do you mean by "html format"? Could you give a concrete example of what the form value would contain versus what you would expect to receive? Would not either escape() or URLencode() do the job?
bladesage
Traveller wrote:
bladesage wrote:
But do you know if there's a way to mail form values in html format?


If "BodyText" is the name of a form input, that would work, but what do you mean by "html format"? Could you give a concrete example of what the form value would contain versus what you would expect to receive? Would not either escape() or URLencode() do the job?


I'm talking of something totally different now.

I can make a form mail me the value in its inputs, by using

Code:
<form action="mailto:bladesage@sbcglobal.net" enctype="text/plain" method="post">


That would give me an e-mail that looks like:

Quote:

input1=value
input2=value
input3=value
input4=value


Get what I mean?

I want it to send me something like:

Quote:

Input1:
value

Input2:
value

Input3:
value


The only way I know to do that, is to use HTML and some <br> tags and stuff. That way I could have it organized.


Either that, or I'd like to know how to make a PHP script to take ANY posted values and mail them to me, without $_post['input1'] for every single input.
Traveller
Ah! I see, but I'm not sure how to handle it. Perhaps one of the scripts at http://php.resourceindex.com/Complete_Scripts/Form_Processing/ would be a good basis (or complete solution) for what you seek.
Related topics
Australian state to ban workplace e-mail spying
Web e-mail !
Neat e-mail account
Play bay E-Mail (PBeM)
e-mail problems
Longest domain name in the world!
[RESOLVED]OK, so l've noticd that e-mail takes space...
Paypal E-Mail Scam
E-Mail Icon Generator
PHP Mail Form not sending e-mail to my e-mail
Sorry......E-mail not working
Setting up E-mail Problems
Other e-mail addresses on the server...
Sending Form Data to E-mail
Reply to topic    Frihost Forum Index -> Scripting -> Html, CSS and Javascript

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.