Send Form results via email (CDO?) HELP!!!

Results 1 to 2 of 2

Thread: Send Form results via email (CDO?) HELP!!!

  1. #1
    CYPHIRE Guest

    Default Send Form results via email (CDO?) HELP!!!

    Hi. I am trying to setup a &#039sign-on/sign-off&#039 option on my web site which would allow visitors to subscribe to my mailing list by entering in their email address and clicking on the appropriate button. Rather than have the email get sent to me for a manual add/remove for each request, I would like to have the email sent to my listserv directly with the subscribe/unsubscribe command in there. <BR><BR>Now, I have tried this with FrontPage&#039s options for a button that sends the specified form fields. The problem is that it sends the information within quotes or on separate lines. Neither format is acceptable to my listserv. <BR><BR>All I need is an email to be sent to a hardcoded address of my listserv with a single line in the body like :<BR>subscribe <BR>- or -<BR>unsubscribe<BR>where is the email address entered in by the user. <BR><BR>I have seen sample code for CDO - and I have written the piece that would work for mine, except I don&#039t know how to tie that code in to the &#039submit&#039 button. <BR><BR>My experience with ASP / web development is very limited, so if anyone can help me, I would appreciate it. <BR><BR>Thanks in advance. <BR><BR>

  2. #2
    Jason Miller Guest

    Default RE: Send Form results via email (CDO?) HELP!!!

    Your submit button looks like "&#060;input type="submit" name="submit" value="Commit"&#062;"<BR><BR>Somewhere in your page, add in <BR>"&#060;% if request.form("submit") = "Commit" then <BR> if request.form("action") = "Subscribe" then handleEmail(true)<BR> if request.form("action") = "Unsubscribe" then handleEmail(false)<BR> end if %&#062;"<BR>(there&#039s a pull down or something featuring "Subscribe" or "Unsubscribe", user choice)<BR><BR>&#060;% function handleEmail(boolIn)<BR> dim objCDO<BR> set objCDO = (you&#039ve seen this part...)<BR> if boolIn = true then<BR> -&#062; do the subscribe email(s)<BR> else<BR> -&#062; do the unsubscribe email(s)<BR> end if<BR> objCDO.send<BR> set objCDO = nothing<BR> end function %&#062;<BR><BR>Hope it helps.<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