Hello, I am trying to send an XML file to a coldfusion
mailer.
It is not working for me.
Can someone help me with some basic code to construct a mail
forwarder that will onsend the XML data I am sendng it ?
Thanks so much for any help.
MY ACTIONSCRIPT LOADER THAT SUBMITS THE DATA TO COLDFUSION:
var myRequest:URLRequest = new URLRequest("
http://localhost/forwarder.cfm");
myRequest.data = cardXML;
myRequest.method = URLRequestMethod.POST;
var loader:URLLoader = new URLLoader();
/*loader.addEventListener(Event.COMPLETE, handleResponse);*/
loader.load(myRequest);
MY COLDFUSION MAILER - this nis not working for me. Can
anyone help out ?
<cfsilent>
<cfsetting enablecfoutputonly="Yes">
<cfset success = 0>
<cftry>
<cfset philXML =
XmlParse(getHTTPRequestData().content)> /converts incoming XML
to Coldfusion variable ??
<cfmail // the mailer itself
to = "emailHere"
from="emailHere"
replyto = "emailHere"
failto = "emailHere"
subject = "business card ORDER LODGED"
username = "xxx"
password = "xxx"
server = "xxxx"
port = "25"
mailerid = "headerid"
timeout = "20">
#philXML# //the actual XML to be forwarded
</cfmail>
</cftry>
</cfsilent>
<cfcontent type="text/xml">
<cfoutput><?xml version="1.0"
?><success>#success#</success></cfoutput>
//returns success notification
<cfsetting showdebugoutput="no"
enablecfoutputonly="No">