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

How do I store passwords for the entire application

Guest
Apr 14, 2010 Apr 14, 2010

I am using the cfmail tag and am required to use a user name and password.  I'd like to centralize this login information in a single place to simplify the code and allow me to change the password often.  Can anyone recommend a way to do this?

TOPICS
Getting started
312
Translate
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
Valorous Hero ,
Apr 14, 2010 Apr 14, 2010

Set the user name and password for the mail server in the mail settings in the ColdFusion Administrator.

http://livedocs.adobe.com/coldfusion/8/htmldocs/basiconfig_11.html#1139855

Translate
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
Community Expert ,
Apr 15, 2010 Apr 15, 2010
LATEST

theedryden wrote:

I am using the cfmail tag and am required to use a user name and password.  I'd like to centralize this login information in a single place to simplify the code and allow me to change the password often.  Can anyone recommend a way to do this?

You should normally store variables that are needed application-wide in application scope in the onApplicationStart method. For example,

<cfset application.adminUsername = "BKBK">

<cfset application.adminPassword = "kB43kB21">

<cfset application.datasource = "myDSN">

This occurs once only. You may then use application.adminUsername, application.adminPassword, etc., anywhere in the application.

Translate
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