• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

CFMAIL problem

Guest
Jun 17, 2008 Jun 17, 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.
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">
TOPICS
Advanced techniques

Views

260

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jun 17, 2008 Jun 17, 2008

Copy link to clipboard

Copied

LATEST
a cftry block ust have at least one cfcatch in it - i do not see any in
the code you posted...

Azadi Saryev
Sabai-dee.com
http://www.sabai-dee.com/

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation