<% Dim tmpEMail Dim sendername : sendername = request("SendersName") dim senderemail : senderemail = request("Email") dim friend1name : friend1name = request("Friend1Name") dim Friend1Email : Friend1Email = request("Friend1Email") dim friend2name : friend2name = request("Friend2Name") dim friend2email : friend2email = request("Friend2Email") dim friend3name : friend3name = request("Friend3Name") dim friend3email : friend3email = request("Friend3Email") dim strAct : strAct = request("act") dim errStr : errStr = "" if strAct = "send" then 'response.Write("!!") ' first make sure that the user has entered the right amount of data ' to do a send.... if not(isEmail(Friend1Email)) then errStr = errStr & "Friend1Email," end if if not(isemail(senderemail)) then errStr = errStr & "senderemail," end if if sendername = "" then errStr = errStr & "sendername," end if if friend1name = "" then errStr = errStr & "friend1name," end if if errStr = "" then Set fs=Server.CreateObject("Scripting.FileSystemObject") Set f=fs.OpenTextFile(Server.MapPath("emails/recommended.htm"), 1) strHTMLEmail = f.ReadAll f.Close Set f=Nothing Set fs=Nothing if friend1name<>"" and isemail(friend1email) then tmpEMail = replace(strHTMLEmail,"sendername",sendername) tmpEMail = replace(tmpEMail,"sendeename",friend1name) call mailit(tmpEmail, friend1email, friend1name,sendername) end if if friend2name<>"" and isemail(friend2email) then tmpEMail = replace(strHTMLEmail,"sendername",sendername) tmpEMail = replace(tmpEMail,"sendeename",friend1name) call mailit(tmpEmail, friend1email, friend1name,sendername) end if if friend3name<>"" and isemail(friend3email) then tmpEMail = replace(strHTMLEmail,"sendername",sendername) tmpEMail = replace(tmpEMail,"sendeename",friend1name) call mailit(tmpEmail, friend1email, friend1name,sendername) end if if lcase(request("Mailing")) = "yes" then 'get template file and re-jig it! Set fs=Server.CreateObject("Scripting.FileSystemObject") Set f=fs.OpenTextFile(Server.MapPath("emails/mailingwelcome.htm"), 1) strHTMLEmail = f.ReadAll f.Close Set f=Nothing Set fs=Nothing strHTMLEmail = replace(strHTMLEmail,"sender",sendername) 'send mailing list confirmation to the user! set Dmailer2 = Server.CreateObject("SMTPsvg.mailer") Dmailer2.ContentType = "text/html" Dmailer2.FromName = "info@woo-music.co.uk" Dmailer2.FromAddress= "info@woo-music.co.uk" Dmailer2.ReplyTo = "info@woo-music.co.uk" Dmailer2.RemoteHost = "mail.freshegg.net" DMailer2.AddRecipient sendername,senderemail Dmailer2.Subject = "Welcome to the Woo-Music Mailing List" Dmailer2.BodyText = strHTMLEmail if DMailer2.SendMail then else 'shizzle ma nizzle end if set Dmailer2 = nothing response.write "Sending to info " set Dmailer3 = Server.CreateObject("SMTPsvg.mailer") Dmailer3.ContentType = "text/html" Dmailer3.FromName = "info@woo-music.co.uk" Dmailer3.FromAddress= "info@woo-music.co.uk" Dmailer3.ReplyTo = "info@woo-music.co.uk" Dmailer3.RemoteHost = "mail.freshegg.net" DMailer3.AddRecipient "info@woo-music.co.uk","info@woo-music.co.uk" DMailer3.AddRecipient "anna", "info@annacelestewatson.com" Dmailer3.Subject = "New user added to mailing list" Dmailer3.BodyText = "A new user has requested to be added to the woo music mailing list: "&vbcrlf&"Name: "&sendername&vbcrlf&"Email: "&senderemail if DMailer3.SendMail then else Response.Write "Mail send failure. Error was " & Dmailer2.Response response.end end if set Dmailer3 = nothing end if ' mailing list response.Redirect("win-free-music-CD-thanks.asp") end if ' no errors end if %> Download music for meditation, relaxation, healing, shiatsu / yoga
Woo
www.woo-music.co.uk
Woo Home - New Age Music, Relaxation + Shiatsu Treatments
About Woo Music
Music for spiritual healing, relaxing and meditation
Woo Archive - Music Reviews by NME, Melody Maker, All Music Guide...
Contact Woo
Links for music, meditation, shiatsu, spirit + healing
Go to Woo's MySpace pages
FREE delivery of ALL Woo music CDs
 
Unsubscribe
 
To Unsubscribe from the Woo mailing list please email 'UNSUBSCRIBE' to:
info@woo-music.co.uk
   
Woo Music Home | About Woo | Woo Alternative Ambient Electronic Jazz Music Shop | Relaxation Music for Yoga, Meditation & Healing
Woo Music Archive and Reviews | Contact Woo | Woo Mailing List | Links | Shop Info | Privacy | Terms | Site Map
Copyright © Woo 2001 - 2010. Web Site by ANNA CELESTE WATSON - FREELANCE WEB DESIGN
<% sub hasErrors(obj) if errStr <> "" and obj <> "" then if instr(1,lcase(errStr),lcase(obj)) > 0 then select case lcase(obj) case "friend1email" response.write "
Please enter your friend's email address" case "senderemail" response.write "
Please enter your email address" case "sendername" response.write "
Please enter your name" case "friend1name" response.write "
please enter your Friends Name" end select end if end if end sub function mailit(tmpEmail, emailTo, emailName,senderName) set Dmailer = Server.CreateObject("SMTPsvg.mailer") Dmailer.ContentType = "text/html" Dmailer.FromName = "info@woo-music.co.uk" Dmailer.FromAddress= "info@woo-music.co.uk" Dmailer.ReplyTo = "info@woo-music.co.uk" Dmailer.RemoteHost = "mail.freshegg.net" DMailer.AddRecipient emailName,emailTo Dmailer.Subject = "Your Friend " &senderName& " has recomended you visit Woo" Dmailer.BodyText = tmpEmail if DMailer.SendMail then mailit = true else mailit = false end if set Dmailer = nothing end function function isEmail(BYREF strEmail) isEmail = true If Len(strEmail) < 5 Then isEmail = False Else If Instr(1, strEmail, " ") <> 0 Then isEmail = False Else If InStr(1, strEmail, "@") < 2 Then isEmail = False Else If InStrRev(strEmail, ".") < InStr(1, strEmail, "@") + 2 Then isEmail = False End If End If End If End If end function %>