Contact form emailed to specific address


i new feel got many aspects of form creation down. problem having data input website viewer emailed email address.
now, have contacted hosting company , given script use function. script follows password portion x’ed out:


<%
'www.3essentials.com - formmail.asp example aspsmartmail object usage
'3essentials hosting formmail script provided without warranty of anykind
'constants change these use email address
'note, if rename submit button, need alter if statement

ssender = "customerservice@skeletonfinders.com" 'the email address email come
spassword = "xxxxxx"
sdisplay = "contact form" 'the display name sender, if wish use "display/friendly name"
srecipient = "customerservice@skeletonfinders.com" 'the email address email sent
ssubject = "contact form results"


%>
<html>
<head>
<title>asp form mail</title>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
body,td,th {
font-family: tahoma, verdana, arial, helvetica, sans-serif;
}
body {
background-image: url(images/index34.gif);
}
-->
</style></head>
<%

'the following lines check see if page has been submitted itself, , if so, builds smessage variable (the body of mail), ,
' run mail sending code.
' if change submit button, need change line
if request.form("submit") = "submit"
for x = 1 request.form.count
smessage = smessage & request.form.key(x) & " = "
smessage = smessage & request.form.item(x) & "<br>"
next

on error resume next

dim mysmartmail
set mysmartmail = server.createobject("aspsmartmail.smartmail")

' mail server
' ***********
mysmartmail.server = "127.0.0.1"

' smtp auth
' ***********
' note, section required - 3essentials servers require smtp auth.
' smtp auth means mail server expects connection present valid email username , password
' in order send email, through smtp client (outlook, outlook express).
' further, 3essentials mail servers require smtp auth username same sender/from name on email address.
' prevents spoofing of sender email addresses.
mysmartmail.username = ssender
mysmartmail.password = spassword

'
' ****
mysmartmail.sendername = sdisplay
mysmartmail.senderaddress = ssender

'
' **
mysmartmail.recipients.add srecipient

' message
' *******
mysmartmail.subject = ssubject
mysmartmail.body = smessage

' send message
' ****************
mysmartmail.sendmail

if err.number<>0
response.write "error: " & err.description
else
response.write "email sent."
end if

end if
%>
<body>
<form name="form1" method="post" action="smartmailformmail1.asp">
<p>
<input name="textfield" type="text" size="30" maxlength="35">
</p>
<p>
<input name="textfield2" type="text" size="30" maxlength="35">
</p>
<p>
<input name="textfield3" type="text" size="15" maxlength="15">
</p>
<p>
<textarea name="textfield4" cols="31"></textarea></p>
<p>
<input type="submit" name="submit">
</p>
</form>
</body>
</html>


i told form supposed able processed on page out going page previous script gave do. (that on did not work either)
the action part had =“../local%20settings/temp/formmail.asp" instead of have ="smartmailformmail1.asp".
i don’t want have go www.bebosoft.com because want understand doing wrong.
my form can viewed @ www.skeletonfinders.com/contactform.html
if 1 can me work appreciate it.
text

you can remove location form tag, or give same
name page, , whole thing operate on same page.

--
paul whitham
certified dreamweaver mx2004 professional
adobe community expert - dreamweaver

valleybiz internet design
www.valleybiz.net

"bigct9" <webforumsuser@macromedia.com> wrote in message
news:ec29vi$k2j$1@forums.macromedia.com...
>i new feel got many aspects of form
>creation
> down. problem having data input website viewer
>
> emailed email address.
> now, have contacted hosting company , given script use
> function. script follows password portion x?ed out:
>
>
> <%
> 'www.3essentials.com - formmail.asp example aspsmartmail object usage
> '3essentials hosting formmail script provided without
> warranty of
> anykind
> 'constants change these use email address
> 'note, if rename submit button, need alter if
> statement
>
> ssender = "customerservice@skeletonfinders.com" 'the email address
>
> email come
> spassword = "xxxxxx"
> sdisplay = "contact form" 'the display name sender, if wish
> use
> "display/friendly name"
> srecipient = "customerservice@skeletonfinders.com" 'the email address
> email sent
> ssubject = "contact form results"
>
>
> %>
> <html>
> <head>
> <title>asp form mail</title>
> <meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
> <style type="text/css">
> <!--
> body,td,th {
> font-family: tahoma, verdana, arial, helvetica, sans-serif;
> }
> body {
> background-image: url(images/index34.gif);
> }
> -->
> </style></head>
> <%
>
> 'the following lines check see if page has been submitted
> itself,
> , if so, builds smessage variable (the body of mail), ,
> ' run mail sending code.
> ' if change submit button, need change line
> if request.form("submit") = "submit"
> x = 1 request.form.count
> smessage = smessage & request.form.key(x) & " = "
> smessage = smessage & request.form.item(x) & "<br>"
> next
>
> on error resume next
>
> dim mysmartmail
> set mysmartmail = server.createobject("aspsmartmail.smartmail")
>
> ' mail server
> ' ***********
> mysmartmail.server = "127.0.0.1"
>
> ' smtp auth
> ' ***********
> ' note, section required - 3essentials servers require smtp
> auth.
> ' smtp auth means mail server expects connection present
>
> valid email username , password
> ' in order send email, through smtp client
> (outlook,
> outlook express).
> ' further, 3essentials mail servers require smtp auth username
>
> same sender/from name on email address.
> ' prevents spoofing of sender email addresses.
> mysmartmail.username = ssender
> mysmartmail.password = spassword
>
> '
> ' ****
> mysmartmail.sendername = sdisplay
> mysmartmail.senderaddress = ssender
>
> '
> ' **
> mysmartmail.recipients.add srecipient
>
> ' message
> ' *******
> mysmartmail.subject = ssubject
> mysmartmail.body = smessage
>
> ' send message
> ' ****************
> mysmartmail.sendmail
>
> if err.number<>0
> response.write "error: " & err.description
> else
> response.write "email sent."
> end if
>
> end if
> %>
> <body>
> <form name="form1" method="post" action="smartmailformmail1.asp">
> <p>
> <input name="textfield" type="text" size="30" maxlength="35">
> </p>
> <p>
> <input name="textfield2" type="text" size="30" maxlength="35">
> </p>
> <p>
> <input name="textfield3" type="text" size="15" maxlength="15">
> </p>
> <p>
> <textarea name="textfield4" cols="31"></textarea></p>
> <p>
> <input type="submit" name="submit">
> </p>
> </form>
> </body>
> </html>
>
>
> told form supposed able processed on page
>
> out going page previous script gave do. (that
> on did
> not work either)
> action part had =?../local%20settings/temp/formmail.asp"
> instead of have ="smartmailformmail1.asp".
> don?t want have go www.bebosoft.com because want
> understand doing wrong.
> form can viewed @ www.skeletonfinders.com/contactform.html
> if 1 can me work appreciate it.
> text
>




More discussions in Dreamweaver support forum


adobe

Comments

Popular posts from this blog

Connecting Raspberry Pi 2 to P10(1R)-V706 LED Dot Matrix - Raspberry Pi Forums

TypeError: <unknown> is not a numpy array - Raspberry Pi Forums

datso and removing imagetitle - Joomla! Forum - community, help and support