<%@ Language="VBScript" %> <% ' Configure your email settings Const SMTP_SERVER = "smtp.yourserver.com" ' Replace with your SMTP server Const SMTP_PORT = 25 ' Replace with your SMTP port, usually 25, 587, or 465 Const EMAIL_FROM = "no-reply@kiddiecirclefriends.com" ' Replace with your email address Dim objMail, strFromEmail, strFromName, strToEmail, strToName, strMessage, strPicName, strSoundName ' Get form data strFromEmail = Request.Form("FromEmail") strFromName = Request.Form("FromName") strToEmail = Request.Form("ToEmail") strToName = Request.Form("ToName") strMessage = Request.Form("Message") strPicName = Request.Form("PicName") strSoundName = Request.Form("SoundName") ' Create the email object Set objMail = Server.CreateObject("CDO.Message") With objMail .Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 .Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = SMTP_SERVER .Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = SMTP_PORT .Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = False ' Set to True if your server requires SSL .Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1 .Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusername") = "yourusername" ' Replace with your SMTP username .Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "yourpassword" ' Replace with your SMTP password .Configuration.Fields.Update ' Set email details .From = EMAIL_FROM .To = strToEmail .Subject = "You've received a special ecard!" ' Construct the HTML body .HTMLBody = "
" .HTMLBody = .HTMLBody & "

Hello " & Server.HTMLEncode(strToName) & ",

" .HTMLBody = .HTMLBody & "

" & Server.HTMLEncode(strMessage) & "

" .HTMLBody = .HTMLBody & "

From: " & Server.HTMLEncode(strFromName) & " (" & Server.HTMLEncode(strFromEmail) & ")

" .HTMLBody = .HTMLBody & "Ecard Image" .HTMLBody = .HTMLBody & "" .HTMLBody = .HTMLBody & "
" ' Send the email .Send End With ' Clean up Set objMail = Nothing ' Redirect to a confirmation page or show a success message Response.Redirect "thankyou.html" ' Create this page to inform the user that their ecard has been sent %>

Kiddiecirclefriends.com