Coldfusion 8 Submit Changes does not save Mail Server Settings in CF Administrator

346 views Asked by At

I am currently running Coldfusion 8,0,1,195765 on a Windows 2003 SP 2 server over IIS 6.0.

I needed to change one of the Mail Server Settings in the ColdFusion Administrator, but when I clicked Submit Changes, the page appeared to refresh, and the field was reverted.

I made a change to another page to make sure that changes could be made, and sure enough, the change was applied.

There are no errors shown - everything looks normal, aside from the change.

I was able to make my changes programatically, using mail.cfc, and my change did appear in CF Admin.

My concern is that mail functions have been corrupted or compromised - my primary request for the stackoverflow gurus is how can I restore my Mail Server Settings functionality?

My secondary request is How could this have happened?

Thank you for reading my question.

1

There are 1 answers

1
JDev On

I am having a similar problem with debugging.

Regarding your first question... You can access the administrator api programatically. Here's how you can verify connection and verify what the current settings are:

<cfscript>
  /* you must log in first */
  adminObj = createObject("component","cfide.adminapi.administrator"); // this assumes default installation
  adminObj.login("password"); // enter your cf admin password


  mailServerObj = createObject("component","cfide.adminapi.mail");
  value = mailServerObj.getMailServers();
</cfscript>

<cfdump var="#value#">

Value is an array of your current mail server settings.

To make a change change the last part of your script to:

  mailServerObj = createObject("component","cfide.adminapi.mail");
  mailServerObj.setMailServers(
    "yourMailServer",
    portNumber,
    username="yourUsername",
    password="yourPassword",
    priority="yourServerPriority");
  value = mailServerObj.getMailServers();

The only required value is the entry for yourMailServer. Also, the optional value, portNumber, must be numeric.

Check out http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=basiconfig_37.html for the Adobe documentation for using the Administrator API.

You can also see a complete listing of the Administrator API CFC and their respective functions, check out http://www.cfexecute.com/admin-api-documentation/