UNKNOWN //************************************** // Name: Send Email By CDONTS // Description:Use Object CDONTS to send Email instead of CFmail. This is a UDF. // By: Jerry_Z // // // Inputs:from,to,subject,body,fileName // // Returns:None // //Assumes:None // //Side Effects:None //This code is copyrighted and has limited warranties. //Please see http://www.Planet-Source-Code.com/xq/ASP/txtCodeId.49/lngWId.9/qx/vb/scripts/ShowCode.htm //for details. //************************************** <cfScript> function sendEmail(from,to,subject,body,fileName){ objMail=CreateObject("COM","CDONTS.NewMail"); objMail.to="#to#"; objMail.From="#from#"; objMail.subject="#subject#"; objMail.Body="#body#"; objMail.MailFormat = 0; objMail.BodyFormat = 0; if (fileName is not ""){ objMail.AttachFile(#FileName#); } objMail.Send(); objMail=""; } </cfscript>