<% on error resume next Dim objNewMail, sTmp, aAtts, sDefFromName, sDefFromEmail Set objNewMail = Server.CreateObject("CDONTS.NewMail") sDefFromName = "SRC Website" sDefFromEmail = request("inputEmail") sBody = "Name: "& request("inputName") & "
" & sSubject = request("emailTitle") '-- Check Vars -- if len(sFromName)<1 then sFromName = sDefFromName if len(sFromEmail)<1 then sFromEmail = sDefFromEmail '-- Basic details -- objNewMail.From = """" & sFromName & """ <" & sFromEmail & ">" objNewMail.To = """"&sRecpName&""" <"&sRecpEmail&">" objNewMail.Subject = sSubject objNewMail.bodyformat = 0 objNewMail.mailformat = 0 objNewMail.Body = sBody '-- Attachments -- for each sTmp in split(sAtts,",") objNewMail.AttachFile server.mappath(sRootPath & sTmp) next '-- Send and Return -- objNewMail.send Set objNewMail = Nothing doSendEmail=true : if err.number<>0 then doSendEmail=false %>