0
posting xml to CFMAIL

/t5/coldfusion-discussions/posting-xml-to-cfmail/td-p/190304
Jun 16, 2008
Jun 16, 2008
Copy link to clipboard
Copied
Hello, I am trying to send an XML file to a coldfusion
mailer.
It is not working for me.
I am confident the actionscript is correct, but 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:
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 needs to be done properly. 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">
It is not working for me.
I am confident the actionscript is correct, but 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:
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 needs to be done properly. 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">
TOPICS
Flash integration
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Advocate
,
LATEST
/t5/coldfusion-discussions/posting-xml-to-cfmail/m-p/190305#M17178
Jun 30, 2008
Jun 30, 2008
Copy link to clipboard
Copied
Hi,
Are you getting the xml dump when you put it under the <cfdump> tag?...
Are you getting the xml dump when you put it under the <cfdump> tag?...
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more

