<% Session.CodePage = 65001 ' Change this to your own SMTP server strHost = "smtp.ssun.co" if Request("Send") <> "" Then Set objMail = Server.CreateObject("Persits.MailSender") objMail.Host = strHost objMail.Username = "contact@ssun.co" objMail.Password = "C0ntactM3!" objMail.From = "contact@ssun.co" ' From address objMail.FromName = "Contact - Ssun.co" ' optional strToAddress = Trim(Request("txtTo")) ' To prevent header injection attack strToAddress = Replace( strToAddress, " ", "" ) strToAddress = Replace( strToAddress, chr(13), "" ) strToAddress = Replace( strToAddress, chr(10), "" ) ' To address, 2nd argument omitted. objMail.AddAddress "ssun@ssun.co" txtSubject = "New Mesaage from:" + txtFrom ' Message subject objMail.Subject = objMail.EncodeHeader( Request("txtSubject"), "UTF-8" ) ' Enable Unicode objMail.ContentTransferEncoding = "Quoted-Printable" objMail.CharSet = "UTF-8" ' Message body objMail.Body = Request("txtBody") ' Include a disclaimer objMail.Body = objMail.Body & chr(13) & chr(10) & chr(13) & chr(10) & "-----------------------------------" & chr(13) & chr(10) & chr(13) & chr(10) & "New Message from a visitor to ssun.co" On Error Resume Next objMail.Send ' Send message If Err = 0 then txtMsg = "Success! Message sent. " & strToAddress + "." Else txtMsg = "Error occurred: " + err.Description + "" End If End If %> Contact Spencer

Spencer Sun

 

Home Photo Albums Track Me Resume Where I've Been Contact Me

Drop me a line

Want to leave a comment on a photo?
Ask about a trip?
Just say "Hi!"

From: ">
Body:

<% = txtMsg %>