Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8785877
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T21:28:07+00:00 2026-06-13T21:28:07+00:00

I am trying to use mappings for the first time and I am having

  • 0

I am trying to use mappings for the first time and I am having some issues. In my CFadmin I created a mapping which goes like this:

Logical Path:

/email_sender

Directory Path:

E:\sites\Example.Com\cf_modules\autoresponders\Emails\emailLists

I am trying to access the include file from a .cfc. Inside my cfc I have an include file which is in the same folder and it works just fine but that include file is tying to access another include file based on the information I am passing through.

The include file inside the component has this code in it.

<cfmail from="#emailData.sender#" to="#surveymain.email#" subject="#subject#"  type="HTML" >
    <cfinclude template="#emailData.includePath#" >
</cfmail>    

Just to be more clear this is my total filesystem:

access.cfm -> some.cfc -> include_1 (works) -> include_2 (issue with
the path)

I have a try/catch which emails me the errors and it is located inside the include_1.

How can I use the mapping that I created to finally be able to access my include file?

Please note that after emailLists I have dynamic folders which change depending on which client I am trying to send the email to. So the end result of the path would be:

E:\sites\Example.Com\cf_modules\autoresponders\Emails\emailLists\client_A\email_template.cfm

I tried using my mapping by doing this
<cfinclude template="/email_sender/#emailData.includePath#" >

which gave me this error:

The path to the CFC must be specified as a full path, or as a relative
path from the current template, without the use of mappings.

Also, I tried including a full path in the cfinclude whic also resulted in the following error:

Note: If you wish to use an absolute template path (for example, >template=”/mypath/index.cfm”) with CFINCLUDE, you must create a
mapping for the path using the ColdFusion Administrator. Or, you can
use per-application settings to specify mappings specific to this
application by specifying a mappings struct to THIS.mappings in
Application.cfc.
Using relative paths (for example,
template=”index.cfm” or template=”../index.cfm”) does not require the
creation of any special mappings. It is therefore recommended that you
use relative paths with CFINCLUDE whenever possible.

Any help/suggestion would be much appreciated

Edit:
After restarting the server the version that worked was this one:
<cfinclude template="/email_sender/#emailData.includePath#" >

Thanks to those who replied.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T21:28:08+00:00Added an answer on June 13, 2026 at 9:28 pm

    Some questions, rather than some answers.

    1. Did you set the mapping in CFAdmin or in Application.cfc?
    2. What do you get if you run the code below?

      #expandPath(“/email_sender”)#

    3. What is the value of #emailData.includePath#?

    4. What is the value of this: #expandPath("/email_sender#emailData.includePath#")#?
    5. Can you provide us with the exact text of the error messages, rather than vaguely describing them.
    6. What is the value of #fileExists(expandPath("/email_sender#emailData.includePath#"))#?

    If you can update your question with that info, you’ll either spot where you’re going wrong, or we can help to work out what the story is

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Trying to use nhibernate on sql-server compact edition for unit testing and having some
I've been trying to figure this out for quite some time now. I couldn't
I am trying to use the stored procedure mapping feature in Entity Framework to
I'm trying to use empty() in array mapping in php. I'm getting errors that
I am need paint my image. I'm trying use JQuery in here this link:
Trying to use FNH to map a view - FNH insists on having a
I am trying out seeds.rb for the first time, and one of my data
I'm trying to set up a simple association in NHibernate (this is the first
Having issues mapping a ORACLE TIMESTAMP(9) field to java.sql.Timestamp or java.util.Date in Java Versions:-
i'm trying use facebook API to upload photo in my fan page. I downloaded

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.