Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

help in creating a confirmation page

New Here ,
May 29, 2006 May 29, 2006
i have created an application form in asp and would like new members to receive email telling them they have successfully registered and another to myself the administrator telling me that person x has registered. any assistance would be appreciated.
TOPICS
Server side applications
292
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
May 30, 2006 May 30, 2006
LATEST
Hi,

I use CDOSYS to send email from my ASP. You will first need to check that your host allows this. It's the default now on Windows servers so there should not be an issue here.

For more info look here:

http://www.powerasp.com/content/new/sending_email_cdosys.asp

You will then need to build your form, add validation as needed and build a 'thankyou.asp' page which you redirect to when the form has been submitted.

The 'thankyou.asp' will include your various SMTP gateway authentication requirements and also the field names of your form so as to build your E-Mail.

Something like this maybe:

<%
Dim objMail
Set objMail = Server.CreateObject("CDO.Message")
Set objConfig = Server.CreateObject("CDO.Configuration")

'Configuration:
objConfig.Fields(cdoSendUsingMethod) = cdoSendUsingPort

objConfig.Fields(cdoSMTPServer)="auth.smtp.hostname.co.uk"
objConfig.Fields(cdoSMTPServerPort)=25
objConfig.Fields(cdoSMTPAuthenticate)=cdoBasic
objConfig.Fields(cdoSendUserName) = "mailbox_username"
objConfig.Fields(cdoSendPassword) = "mailbox_password"

'Update configuration
objConfig.Fields.Update
Set objMail.Configuration = objConfig

objMail.From = Request("email")
objMail.To = "me@mydomain.co.uk"
objMail.Subject = "Details from My Form"
objMail.HTMLBody = "<font size=2 face=verdana>"
objMail.HTMLBody = objMail.HTMLBody & "<strong>" & "Contact Name " & "</strong>" & Request.form("name") & "<br>" & "<br>"
objMail.HTMLBody = objMail.HTMLBody & "<strong>" & "Telephone Area Code " & "</strong>" & Request.form("telcode") & "<br>" & "<br>"
objMail.HTMLBody = objMail.HTMLBody & "<strong>" & "Telephone Number " & "</strong>" & Request.form("telnumber") & "<br>" & "<br>"
objMail.HTMLBody = objMail.HTMLBody & "<strong>" & "Email " & "</strong>" & Request.form("email") & "<br>" & "<br>"
objMail.HTMLBody = objMail.HTMLBody & "<strong>" & "Message " & "</strong>" & Request.form("message") & "<br>" & "<br>"
objMail.HTMLBody = objMail.HTMLBody & "Sent at " & Now() & "<br>" & "<br>" & "</font>"
objMail.Send

If Err.Number = 0 Then
Response.Write(".")
Else
Response.Write("Sorry, There was an error processing your questionnaire. Please try again. Code: " & Err.Number)
Err.Clear
End If
Set objMail=Nothing
Set objConfig=Nothing

%>

Hope this helps some

Jules

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines