%@ 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 = "
" & Server.HTMLEncode(strMessage) & "
" .HTMLBody = .HTMLBody & "From: " & Server.HTMLEncode(strFromName) & " (" & Server.HTMLEncode(strFromEmail) & ")
" .HTMLBody = .HTMLBody & "" .HTMLBody = .HTMLBody & "" .HTMLBody = .HTMLBody & "