<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%> f r e e k f l y - mailing list


freekfly mailing list sign-up/removal

<%'Do this when the form is submitted If Request.Form("go") = "yes" Then ' Create the JMail message Object set msg = Server.CreateOBject( "JMail.Message" ) ' Set logging to true to ease any potential debugging ' And set silent to true as we wish to handle our errors ourself msg.Logging = true msg.silent = true ' Most mailservers require a valid email address ' for the sender msg.From = Request.Form("email") msg.FromName = Request.Form("name") ' Next we have to add some recipients. ' The addRecipients method can be used multiple times. ' Also note how we skip the name the second time, it ' is as you see optional to provide a name. msg.AddRecipient "imailsrv@freekfly.com" 'set the subject of the e-mail depending on what action is nedded msg.Subject = "ne-freeflyers" ' The body property is both read and write. ' If you want to append text to the body you can ' use JMail.Body = JMail.Body & "Hello world! " ' or you can use JMail.AppendText "Hello World! " ' which in many cases is easier to use. ' ' Note the use of vbCrLf to add linebreaks to our email If Request.Form("action") = "add" then msg.Body = "subscribe ne-freeflyers " & Request.Form("name") else msg.Body = "unsubscribe ne-freeflyers" End If 'msg.Body = "name = " & Request.Form("name") & vbCrLf & "email = " & Request.Form("email") ' There.. we have now succesfully created our message. ' Now we can either send the message or save it ' as a draft in a Database. ' To save the message you would typicly use the ' Message objects Text property ' to do something like this: ' ' SaveMessageDraft( msg.Text ) ' Note that this function call is only an ' example. The function does not exist by ' default, you have to create it yourself. ' To send the message, you use the Send() ' method, which takes one parameter that ' should be your mailservers address ' ' To capture any errors which might occur, ' we wrap the call in an IF statement if not msg.Send("smtp.hargray.com" ) then Response.write "
" & msg.log & "
" else If Request.Form("action") = "add" then%>

thank you for joining the new england freekfly mailing list. you should receive a confirmation e-mail shortly. if you do not receive an e-mail, then there is a problem with the address you entered.

<%else%>

you've unsubscribed from the new england freekfly mailing list.

<%end if end if else%>

name:
e-mail:
 
 

keep up to date on all of the freekfly news and what's going on for events in new england......for freeflying anyway ;-)

this list is not drop zone specific, but will be geared towards freeflyers in the new england area. the only people that will be able to post to this group are it's members.....this means you and this also means no spam.

enjoy! -brian

 

<%end if%>