Skip to main content
December 17, 2015
Answered

Email Attachment to Server for Cold Fusion to Manipulate

  • December 17, 2015
  • 2 replies
  • 525 views

Is there any way to Email an Email Attachment for Cold Fusion to Manipulate.

Sort of like <cffile action = "upload"> however user is emailing the file into the Cold Fusion Server.

The reason for this:

Now we  have an app  that reads data on users smart phones and the user emails the file to themselves.

However now we have found in some cases we need to do some basic manipulation that Cold Fusion could easily do to clean up the data.

So user would email attachment of data to our server and then server would do clean up and email cleaned file to user.

If there is nothing in CF to do this, any other language?

Thanks

This topic has been closed for replies.
Correct answer Carl Von Stetten

ColdFusion doesn't have a built-in email server, but it can retrieve emails from email servers via the <CFPOP> and <CFIMAP> tags.  You could then do your clean up on retrieved messages, and send them back out via <CFMAIL>.

-Carl V.

2 replies

Known Participant
December 30, 2015

You could also consider running a small java email server (Java SMTP/POP EMail Server download | SourceForge.net) along side your Web Server that is used as a Message Queue of sorts. Using Sieve commands - there is no reason you can't redirect emails to save in a specific folder of your choosing - perhaps in cfusion/mail/Queue and putting a Directory Listener (Watching a Directory for Changes The Java™ Tutorials  Essential Classes > Basic I/O) on that path that will kick off a ColdFusion request (How to Send HTTP Request and Capture Response in Java) when messages are received. The directory listener could be kicked off with Filters when the ColdFusion servlet container starts (So could the java mail server for that matter)... Just a thought

Carl Von Stetten
Carl Von StettenCorrect answer
Legend
December 17, 2015

ColdFusion doesn't have a built-in email server, but it can retrieve emails from email servers via the <CFPOP> and <CFIMAP> tags.  You could then do your clean up on retrieved messages, and send them back out via <CFMAIL>.

-Carl V.

December 17, 2015

Thanks Carl

I explored <CFPOP> and <CFIMAP> a little but didn't see the capabilities , I will revisit with more determination. Thank you so much I'll let you know how it turns out.

Doug