%option explicit
dim FriendsEmail,FriendsName,SenderName,EmailSubject,EmailMessage,SenderEmail,error,WholeEmail,dear,sincerely,ArtistName,Link
ArtistName = "Spyro Gyra: Wrapped In A Dream"
Link = "http://www.headsup.com/ecards/3107/"
SenderName = Request.Form("SenderName")
SenderEmail = Request.Form("SenderEmail")
FriendsEmail = Request.Form("FriendsEmail")
FriendsName = Request.Form("FriendsName")
EmailSubject = Request.Form("EmailSubject")
EmailMessage = Request.Form("EmailMessage")
dear = Request.Form("dear")
sincerely = Request.Form("sincerely")
If Request.Form("returning") = 1 then
If instr(SenderName,";") Then
SenderName = replace(SenderName,";","")
error = "Please only use valid alpha-numeric characters "
End If
if SenderName = "" then
sincerely = ""
else
sincerely = "Sincerely Yours, " & vbnewline & SenderName
end if
if FriendsName <> "" then
dear = "Dear " & FriendsName & ","
else
dear = "Dear *your friends name will appear here*"
end if
if SenderEmail = "" then
error = error & "Please enter a valid email address for yourself. "
end if
if FriendsEmail = "" then
error = error & "Please enter a valid email address of one of your friends. "
end if
If FriendsEmail <> "" and SenderEmail <> "" then
WholeEmail = dear & " -- " & EmailMessage & " -- " & sincerely
WholeEmail = "Subject: " & EmailSubject & " -- Message: " & WholeEmail
If err.number = 0 then
dim oMail
set oMail = server.CreateObject("CDONTS.NewMail")
oMail.To = FriendsEmail & "(" & FriendsName & ")"
oMail.From = SenderEmail & "(" & SenderName & ")"
oMail.Subject = EmailSubject
oMail.Body = dear & vbnewline & vbnewline & EmailMessage & vbnewline & vbnewline & sincerely
oMail.Send
set oMail = nothing
Response.Redirect "/ecards/send_thanks.htm"
end if
end if
else
dear = "Dear *your friends name will appear here*"
sincerely = "Sincerely Yours, " & SenderName
EmailMessage = "I've just discovered this great new album by " & ArtistName & ". I think you'll really like it. Check it out at " & Link & vbnewline & vbnewline & "PS: Simply click on the above link or launch a web browser and copy/paste the link into your browser's address bar."
EmailSubject = "New Album from " & ArtistName
end if
%>
If you don't have an MP3 player, download the free RealJukebox
player now.
Make sure you've got RealPlayer to view & listen to
our video & audio selections.
Send
This E-Card To A Friend
Do you have a friend that would enjoy this release.
Please take a moment to share the excitement. Simply complete the
brief form below and we'll send them an email notification. Thanks.
<%="
" & error & "
"%>
Note: If you have any Pop-Up Blocker applications enabled, the ecard will not appear. Please disable and reload this page.