sending a form to a mailbox

Results 1 to 3 of 3

Thread: sending a form to a mailbox

  1. #1
    Isabelle Guest

    Default sending a form to a mailbox

    Hi,<BR><BR>I&#039m making a guestbook in ASP. But now I want an E-mail being sent to the webmaster everytime someone leaves a message in the guestbook! Can you do this in ASP??<BR><BR>tHANKS ISABELLE

  2. #2
    John Harrod Guest

    Default RE: sending a form to a mailbox

    I have one of these on my web page. I do what you are wanting to do plus record it in a database. If your web server has the NT 4.0 option pack installed you can change this code to fit your needs. The code assumes you have a save button on your page.<BR>See http://www.johnharrod.com/guestbook.asp<BR><BR>Sub btnSave_onclick()<BR>If txtEmail.value = "" Then<BR>Response.Redirect "/guestbook.asp"<BR>Else<BR>End If<BR>rstGuestBook.updateRecord <BR>Set Mailer = Server.CreateObject("SMTPsvg.Mailer")<BR>Mailer.Fr omName = "John B. Harrod"<BR>Mailer.FromAddress = "harrodj@johnharrod.com"<BR>Mailer.AddCC "John B. Harrod", "harrodj@johnharrod.com"<BR>Mailer.AddRecipien t Request.Form(""), Request.Form("txtEmail")<BR>Mailer.RemoteHost = "mail.lco.net"<BR>Mailer.Subject = "John Harrod&#039s Guest Book"<BR>Mailer.BodyText = "Thanks " & Request.Form ("txtFirstName") & " for signing my Guest Book." & " http://johnharrod/guestbook.asp"<BR>Mailer.SendMail<BR>Response.Redi rect "/guestbook.asp"<BR>End Sub

  3. #3
    Branavan Guest

    Default RE: sending a form to a mailbox

    Do you need to get the SMTPsvg.Mailer component and install it on the server or does it come with NT option pack 4? If not where do you get the component?<BR><BR>Thanks. <BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •