Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / ColdFusion / Advanced Techniques / January 2008



Tip: Looking for answers? Try searching our database.

reading and parsing .eml email files to get the subject, from, to, etc

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
jqcf - 29 Jan 2008 19:29 GMT
Here's some java code that does exactly what I want to do.
http://www.rgagnon.com/javadetails/java-0458.html
However, I want to run this code in a .cfm file on my coldfusion server:
I'm clueless how to put this java code into a cfscript tag with the right
syntax.
Any pointers or tips to help me get started would be very much appreciated.
jqcf - 29 Jan 2008 22:29 GMT
Here's one line in particular I'm not sure how to code:
Session mailSession = Session.getDefaultInstance(props, null);

The first few lines, I think I can code something like this:
<cffile action="read" file="#ExpandPath('email.eml')#/" variable="test">
<cfobject type="java" name="props" class="java.util.Properties"
action="create">
<cfset temp = props.put("mail.host", "smtp.test.com")>
<cfset temp2 = props.put("mail.transport.protocol", "smtp")>
Adam Cameron - 29 Jan 2008 23:24 GMT
> Here's one line in particular I'm not sure how to code:
>  Session mailSession = Session.getDefaultInstance(props, null);

Reading the docs might help:
http://tinyurl.com/yscqw8

If you just google "Java [name of class]", you'll generally get the docs
for the class in question within the first couple of matches.

Signature

Adam

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.