Getting CFAdmin Mail Server in code

306 Views Asked by At

I've specified a Mail Server in my CFAdmin I want to get it in my code. Is it possible somehow?

2

There are 2 best solutions below

1
On BEST ANSWER

I have to concede I've never had to specifically do what you need to do, but CF has an Admin API. Details are on the Administrator API page in the docs.

Relevant extract:

mail.cfc Manage ColdFusion mail settings.

I reckon that's what yer after.

3
On

Unlike datasources, mail servers are used automatically - you don't need to specify them.

However, you can also supply the assorted properties for a mail server directly as attributes on a cfmail tag, which then overrides those in the administrator for that instance only.

(If this isn't what you're asking, you need to edit your question to clarify and add more information.)