<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: E-mail Processing</title>
	<atom:link href="http://www.shiffman.net/2007/11/13/e-mail-processing/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.shiffman.net/2007/11/13/e-mail-processing/</link>
	<description></description>
	<pubDate>Thu, 20 Nov 2008 16:49:57 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6</generator>
		<item>
		<title>By: Ergy</title>
		<link>http://www.shiffman.net/2007/11/13/e-mail-processing/#comment-281283</link>
		<dc:creator>Ergy</dc:creator>
		<pubDate>Mon, 28 Jul 2008 16:29:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.shiffman.net/2007/11/13/e-mail-processing/#comment-281283</guid>
		<description>Hi I am trying to read an email from from my POP and send an email after a certain event but i get this error:

javax.mail.MessagingException: Could not connect to SMTP host: localhost, port: 25;
  nested exception is:
	java.net.ConnectException: Connection refused
	at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1227)

I think for some reason checkmail() is changing the send</description>
		<content:encoded><![CDATA[<p>Hi I am trying to read an email from from my POP and send an email after a certain event but i get this error:</p>
<p>javax.mail.MessagingException: Could not connect to SMTP host: localhost, port: 25;<br />
  nested exception is:<br />
	java.net.ConnectException: Connection refused<br />
	at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1227)</p>
<p>I think for some reason checkmail() is changing the send</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Daniel</title>
		<link>http://www.shiffman.net/2007/11/13/e-mail-processing/#comment-168661</link>
		<dc:creator>Daniel</dc:creator>
		<pubDate>Thu, 20 Mar 2008 14:21:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.shiffman.net/2007/11/13/e-mail-processing/#comment-168661</guid>
		<description>Thanks for the info Sebastian!</description>
		<content:encoded><![CDATA[<p>Thanks for the info Sebastian!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sebastian Gallese</title>
		<link>http://www.shiffman.net/2007/11/13/e-mail-processing/#comment-166895</link>
		<dc:creator>Sebastian Gallese</dc:creator>
		<pubDate>Sun, 16 Mar 2008 18:46:07 +0000</pubDate>
		<guid isPermaLink="false">http://www.shiffman.net/2007/11/13/e-mail-processing/#comment-166895</guid>
		<description>Note: the code I submitted passes in a username and password to Auth.  I modified Auth to take those in.  In Shiffman's original code, those Strings are set inside of the Auth class itself.

Thus the following:

// Create a session
Session session = Session.getDefaultInstance(props, new Auth(”sebastiang@gmail.com”, “mygmailpassword”));

Should look like this with an unaltered Auth class:

// Create a session
Session session = Session.getDefaultInstance(props, new Auth());</description>
		<content:encoded><![CDATA[<p>Note: the code I submitted passes in a username and password to Auth.  I modified Auth to take those in.  In Shiffman&#8217;s original code, those Strings are set inside of the Auth class itself.</p>
<p>Thus the following:</p>
<p>// Create a session<br />
Session session = Session.getDefaultInstance(props, new Auth(”sebastiang@gmail.com”, “mygmailpassword”));</p>
<p>Should look like this with an unaltered Auth class:</p>
<p>// Create a session<br />
Session session = Session.getDefaultInstance(props, new Auth());</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sebastian Gallese</title>
		<link>http://www.shiffman.net/2007/11/13/e-mail-processing/#comment-166891</link>
		<dc:creator>Sebastian Gallese</dc:creator>
		<pubDate>Sun, 16 Mar 2008 18:20:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.shiffman.net/2007/11/13/e-mail-processing/#comment-166891</guid>
		<description>Wanted to use the SMTP portion of your library to send text messages via e-mail.  I use Teleflip.com to send messages (just e-mail a cellphone number to teleflip.com (e.g., 5555555555@teleflip.com).

However, wasn't able to get the sendMail() method working.  I did a little online research and found out that I could adjust the SMTP port of javamail to send messages via SSL to gmail.
I am not sure how secure this is, but it works for the time being.

I changed the following portions of code under the sendMail() method.

// SMTP Session
  props.put("mail.transport.protocol", "smtp");
  props.put("mail.smtp.host", host);
  props.put("mail.smtp.port", "465");
  props.put("mail.smtp.auth", "true");
  props.put("mail.smtp.socketFactory.port", "465");
  props.put("mail.smtp.socketFactory.class", "javax.net.ssl.SSLSocketFactory");
  // We need TTLS, which gmail requires
  props.put("mail.smtp.starttls.enable","true");

  // Create a session
  Session session = Session.getDefaultInstance(props, new Auth("sebastiang@gmail.com", "mygmailpassword"));</description>
		<content:encoded><![CDATA[<p>Wanted to use the SMTP portion of your library to send text messages via e-mail.  I use Teleflip.com to send messages (just e-mail a cellphone number to teleflip.com (e.g., <a href="mailto:5555555555@teleflip.com">5555555555@teleflip.com</a>).</p>
<p>However, wasn&#8217;t able to get the sendMail() method working.  I did a little online research and found out that I could adjust the SMTP port of javamail to send messages via SSL to gmail.<br />
I am not sure how secure this is, but it works for the time being.</p>
<p>I changed the following portions of code under the sendMail() method.</p>
<p>// SMTP Session<br />
  props.put(&#8221;mail.transport.protocol&#8221;, &#8220;smtp&#8221;);<br />
  props.put(&#8221;mail.smtp.host&#8221;, host);<br />
  props.put(&#8221;mail.smtp.port&#8221;, &#8220;465&#8243;);<br />
  props.put(&#8221;mail.smtp.auth&#8221;, &#8220;true&#8221;);<br />
  props.put(&#8221;mail.smtp.socketFactory.port&#8221;, &#8220;465&#8243;);<br />
  props.put(&#8221;mail.smtp.socketFactory.class&#8221;, &#8220;javax.net.ssl.SSLSocketFactory&#8221;);<br />
  // We need TTLS, which gmail requires<br />
  props.put(&#8221;mail.smtp.starttls.enable&#8221;,&#8221;true&#8221;);</p>
<p>  // Create a session<br />
  Session session = Session.getDefaultInstance(props, new Auth(&#8221;sebastiang@gmail.com&#8221;, &#8220;mygmailpassword&#8221;));</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Acapulco</title>
		<link>http://www.shiffman.net/2007/11/13/e-mail-processing/#comment-160974</link>
		<dc:creator>Acapulco</dc:creator>
		<pubDate>Wed, 05 Mar 2008 02:33:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.shiffman.net/2007/11/13/e-mail-processing/#comment-160974</guid>
		<description>Thaks a lot. This is just what I needed, although when I tested it using my gmail account, I couldn't find a way to stop retrieving the headers, so I had to ctrl-alt-del and stop javaw.exe. Not even using the Processing STOP button or ESC. 

Anyway, it's pretty simple and easy to use. Thanks again.</description>
		<content:encoded><![CDATA[<p>Thaks a lot. This is just what I needed, although when I tested it using my gmail account, I couldn&#8217;t find a way to stop retrieving the headers, so I had to ctrl-alt-del and stop javaw.exe. Not even using the Processing STOP button or ESC. </p>
<p>Anyway, it&#8217;s pretty simple and easy to use. Thanks again.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
