Andrew said:
The form handler will only send email to an email address under the
same domain. eg if your web is
www.greeneggsandham.com then the
email will have to be (e-mail address removed) not
(e-mail address removed)
Andrew,
This may be off-topic, but I am experimenting with setting up a form which
sends data to an email. It is for asking people to join a bus tour (for
enthusiasts)
The code is
<form action="" id="form1" name="form1">
Do you want to join? <br/>
<input type="checkbox" id="yes" name="yes"/>Yes <br/>
<input type="checkbox" id="no" name="no" />No <br/>
Name:<br/>
<input type="text" id="name" name="name" value="yourname" size="20"
/><br/>
Mail:<br/>
<input type="text" id="mail" name="mail" value="yourmail" size="20"
/><br/>
Do you want to see:<br>
Bus1:
<input type="checkbox" id="bus1" name="bus1" /><br/>
Bus2:
<input type="checkbox" id="bus2" name="bus2" /><br/>
.........
Enter Comment:<br/>
<textarea id="comment" name="comment" rows="10" cols="30">Enter your
comment in here</textarea><br />
<input type="button" value="Send" onclick="sendmess()" />
<input type="reset" value="Reset" />
</form>
This works more or less O.K. where sendmess() is
function sendmess()
{
if ( document.forms['form1'].elements['yes'].checked ==
document.forms['form1'].elements['no'].checked )
{alert ('Answer must be one only of Yes or No')
return }
var userTo = "tandcl"
var at = "@"
var domainTo = "homemail.com.au"
var subj = "Response to Deane's Bus Tour"
var content = new Array(
"mailto:" , userTo , at , domainTo ,
"?subject=", subj ,
"&body=" ,
"Name: " , document.forms['form1'].elements['name'].value
,
"Address: " , document.forms['form1'].elements['mail'].value ,
"Yes reply: " ,document.forms['form1'].elements['yes'].checked
,
"No reply: " , document.forms['form1'].elements['no'].checked ,
"Bus1: " , document.forms['form1'].elements['bus1'].checked ,
"Bus2: " , document.forms['form1'].elements['bus2'].checked ,
"Comment: " ,document.forms['form1'].elements['comment'].value
,)
content = content.join("")
window.location = content
}
The "more or less" is that the text is all on one line and I can't get it
to split onto several lines - one for each answer. (I have posted a query
on this but no useful replies have turned up: only add <br> which of
course does just that - it adds the text '<br>' to the email.)
However, my main query is that I couldn't get this to work:
<form action="mailto:
[email protected]" method="post"
enctype="text/plain">
I also changed
<input type="button" value="Send" onclick="sendmess()" />
to
<input type="submit" value="Send" />
I gto a warning message that the email was being sent but it didn't
arrive.
I was sending it from my website:
http://tandcl.homemail.com.au
to my email address:
(e-mail address removed)
Is there somethng else I should be doing ?