CDO COM email script in CF7
I have having issues trying to determine how I can specify the sending server when creating a object that is using CDO COm. I have a script that I have tried but it just sends with the default server and not the one I specified. I have searched the web and asked around and I get no response. This code is kind of a compilation of other scripts and I don't want to say I know anything about this process. If anyone could give me resources to see what can be used or give me more insight on Objects that might help.
<cfscript>
objMail = CreateObject("COM","CDO.Message");
objMail.To="account@mail.com";
objMail.From="account@mail.com";
objMail.Subject="CDO COM CF Test";
objMail.HTMLBody="<h1>Cdo CF TEST</h1>";
iFlds = objMail.Fields;
// Set SendUsing
sendusing = iFlds.Item;
sendusing.value = "2";
// Set SMTP Server
smtpserver = iFlds.Item;
smtpserver.value= "mail.mailserver.com";
// Set Port
smtpserverport = iFlds.Item;
smtpserverport.value = "25";
iFlds.Update();
objMail.Send();
objMail="";
</cfscript>
