<%@LANGUAGE="VBSCRIPT"%> <% Dim objCDO Dim iMsg Dim iMsg2 Dim iConf Dim Flds Const cdoSendUsingPickup = 1 Const strPickup = "c:\inetpub\mailroot\pickup" if request("mailsent") <> "true" and request("formcomplete") <> "true" and request("formsubmit") <> "true" then strTo = "database@maharaj.org" strFrom = "postmaster@maharaj.org" strSubject = "Subscribe to Newsletter" strBody = "This user subscribed to the newsletter:

" & request("subscribe") If strTo = "" Or Not IsValidEmail(strTo) Then response.write "Invalid Email. Please go back!" response.end Else 'For CDOSYS, the pickup directory is located at c:\inetpub\mailroot\pickup. ' Const strPickup = "c:\inetpub\mailroot\pickup" 'Create the message object. Set iMsg = CreateObject("CDO.Message") 'Create the configuration object. Set iConf = iMsg.Configuration With iConf.Fields .item( "http://schemas.microsoft.com/cdo/configuration/sendusing") = cdoSendUsingPickup .item("http://schemas.microsoft.com/cdo/configuration/smtpserverpickupdirectory") = strPickup .Update End With 'Set the To, From, Subject, and Body properties of the message. With iMsg .To = strTo .From = strFrom .Subject = strSubject .HTMLBody = strBody .Send End With Set iMsg = Nothing response.redirect "newsletter.asp?mailsent=true&subscribe=" & request("subscribe") End If end if if request("formcomplete") = "true" then strTo = "database@maharaj.org" strFrom = "postmaster@maharaj.org" strSubject = "Subscribe to Newsletter" strBody = "This user has subscribed to the Newsletter, and filled out further information:

" & request("title") & " " & request("firstName") & " " & request("lastName") & "

" & request("email") & "

" & request("phone") strBody = strBody & "

" strBody = strBody & request("address") strBody = strBody & "
" strBody = strBody & request("town") strBody = strBody & " " strBody = strBody & request("province") strBody = strBody & "
" strBody = strBody & request("country") strBody = strBody & "
" strBody = strBody & request("postalCode") if request("canada") <> "" then canada = "Yes" else canada = "No" end if if request("diplomacy") <> "" then diplomacy = "Yes" else diplomacy = "No" end if if request("sport") <> "" then sport = "Yes" else sport = "No" end if if request("philanthropy") <> "" then philanthropy = "Yes" else philanthropy = "No" end if if request("other") <> "" then otherType = "Yes -- " & request("otherType") & "" else otherType = "No" end if strBody = strBody & "

I am interested in assisting in:" strBody = strBody & "

Canada: " & canada strBody = strBody & "

Civil diplomacy: " & diplomacy strBody = strBody & "

Equestrianism: " & sport strBody = strBody & "

Philanthropy: " & philanthropy strBody = strBody & "

Other: " & otherType 'For CDOSYS, the pickup directory is located at c:\inetpub\mailroot\pickup. ' Const strPickup = "c:\inetpub\mailroot\pickup" 'Create the message object. Set iMsg2 = CreateObject("CDO.Message") 'Create the configuration object. Set iConf = iMsg2.Configuration With iConf.Fields .item( "http://schemas.microsoft.com/cdo/configuration/sendusing") = cdoSendUsingPickup .item("http://schemas.microsoft.com/cdo/configuration/smtpserverpickupdirectory") = strPickup .Update End With 'Set the To, From, Subject, and Body properties of the message. With iMsg2 .To = strTo .From = strFrom .Subject = strSubject .HTMLBody = strBody .Send End With Set iMsg2 = Nothing response.Redirect("newsletter.asp?formsubmit=true") end if Function IsValidEmail(strEmail) Dim bIsValid bIsValid = True If Len(strEmail) < 5 Then bIsValid = False Else If Instr(1, strEmail, " ") <> 0 Then bIsValid = False Else If InStr(1, strEmail, "@", 1) < 2 Then bIsValid = False Else If InStrRev(strEmail, ".") < InStr(1, strEmail, "@", 1) + 2 Then bIsValid = False End If End If End If End If IsValidEmail = bIsValid End Function %> Akaash Maharaj - Newsletter

Thank you for subscribing to my newsletter. I hope you will find the information I will send to you useful in becoming engaged in some of my projects and in working together to advance the public good.

<% if request("formsubmit") = "true" then else %>

If you wish, you can provide below as much or as little additional information about yourself as you wish, to help me send you information that is tailored to you and your region.

Title

First Name

Last Name

E-mail

" style="font-style:italic">

Phone

Address

Town

Province

 

Postal Code

   
I am interested in:
 Canadian public policy
 International affairs and diplomacy
 Tent pegging and equestrian sport
 Philanthropic projects
 other (specify)
   

 

<% end if %>

I value my relationship with my supporters and correspondents, and will not pass your information on to third parties. You may wish to view my privacy statement for full details of my policy in this regard.


















Privacy Policy