Skip to main content
dejank52055655
Inspiring
April 8, 2021
Answered

Could not find the ColdFusion component or interface Mail

  • April 8, 2021
  • 3 replies
  • 389 views

Hi,

We are running CF2021 on Centos 7.9 on three servers with the same CF instance on all three, which are network load balanced. We are getting this error only on one instance when trying to use mail. All three instances are identical.

Could not find the ColdFusion component or interface Mail.Ensure that the name is correct and that the component or interface exists. The specific sequence of files included or processed is: /..../test_mail.cfm, line: 2

Here is the code:

<cfdump var = "#now()#">
<cfscript>
foo = new Mail();
</cfscript>

The mail package is installed. I reinstalled it but still getting the same error.

<cfmail> works fine.

Anything I can do to troubleshoot the issue? Something I can compare with working instance to see if something is not configured?

    This topic has been closed for replies.
    Correct answer Charlie Arehart

    Going a different direction, what do you see if you do a dump of GetComponentMetaData

    on the mail cfc/interface, on the working instances? That will show the location where it IS found, then you can see if that exists in the instance that does NOT work.

     

    It would seem the instances are not so "identical" after all. 🙂 There could be a number of explanations, from installation to configuration to updating issues, and more.

     

    Let's here how the above goes, and we can go further if needed. 

    3 replies

    Charlie Arehart
    Community Expert
    Community Expert
    April 16, 2021

    dejank, I see you marked the first two answers as correct, and thanks. But I do hope you will let us (and readers who may find this) know what was the ultimate conclusion for you. I gather that the GetComponentMetaData on the working instance helped you see where that was found. Did you then find it was not there on the failing one, even though both were expected to be identical?

     

    Since you did mention having installed the mail module (based on the package management capability in CF2021), I am assuming it was not that the module failed to be installed on each instance. Or was that it, after all?

     

    Again, just wanting to close the loop in case anyone else find this thread in the future and wants more than just what our first two answers offered. 🙂

    /Charlie (troubleshooter, carehart. org)
    Charlie Arehart
    Community Expert
    Charlie ArehartCommunity ExpertCorrect answer
    Community Expert
    April 11, 2021

    Going a different direction, what do you see if you do a dump of GetComponentMetaData

    on the mail cfc/interface, on the working instances? That will show the location where it IS found, then you can see if that exists in the instance that does NOT work.

     

    It would seem the instances are not so "identical" after all. 🙂 There could be a number of explanations, from installation to configuration to updating issues, and more.

     

    Let's here how the above goes, and we can go further if needed. 

    /Charlie (troubleshooter, carehart. org)
    BKBK
    Community Expert
    Community Expert
    April 10, 2021

    The error message says that ColdFusion cannot find Mail.cfc in the current folder. That is, in the folder where test_mail.cfm is located.

     

    Something to try. Suppose that the path of Mail.cfc relative to the web root is /dir1/dir2/dir3/Mail.cfc.  Then you should try:

    foo = new dir1.dir2.dir3.Mail();