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

asp code send email from form

Guest
May 17, 2007 May 17, 2007
have asp page (just testing to learn and get it correct) with a form and code to send email.
it sends the email on page load, and i want it to send only one email when the page submits. what addition to the code do i need?

thanks for any help
jim balthrop
TOPICS
Server side applications
353
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

correct answers 1 Correct answer

Deleted User
May 29, 2007 May 29, 2007
found this answer on a thread in the UK. might help someone else.
only sends one email when form submit button is pressed.

added this code

if request.form("submit1") = "Send Form" then
'where submit1 is name of submit button and Send Form is value of submit button

ObjSendMail.To = "jimb@jbwebworks.com"
ObjSendMail.Subject = "check entry form database"
ObjSendMail.From = "pco@pcogolf.org"

' we are sending a text email.. simply switch the comments around to send an html email instead
ObjSend...
Translate
Guest
May 29, 2007 May 29, 2007
LATEST
found this answer on a thread in the UK. might help someone else.
only sends one email when form submit button is pressed.

added this code

if request.form("submit1") = "Send Form" then
'where submit1 is name of submit button and Send Form is value of submit button

ObjSendMail.To = "jimb@jbwebworks.com"
ObjSendMail.Subject = "check entry form database"
ObjSendMail.From = "pco@pcogolf.org"

' we are sending a text email.. simply switch the comments around to send an html email instead
ObjSendMail.HTMLBody = request.form("_email")

ObjSendMail.Send

Set ObjSendMail = Nothing

'also needed to add this
end if
%>
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