Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p><a href="http://www.oracle.com/technetwork/java/javamail/faq/index.html#hotmail" rel="nofollow">This JavaMail FAQ entry</a> might help.</p> <blockquote> <p>Q: How do I access Hotmail (Windows Live mail) with JavaMail?</p> <p>A: JavaMail is capable of sending and reading messages using Hotmail. All that's required is to properly configure JavaMail. I'll illustrate the proper configuration using the demo programs that come with JavaMail - <code>msgshow.java</code> and <code>smtpsend.java</code>.</p> <p>Let's assume your Hotmail username is "user@hotmail.com" and your password is "passwd".</p> <p>To read mail from your Hotmail Inbox, invoke msgshow as follows:</p> <p><code>java msgshow -D -T pop3s -H pop3.live.com -U user@hotmail.com -P passwd</code></p> <p>By reading the <code>msgshow.java</code> source code, you can see how these command line arguments are used in the JavaMail API. You should first try using msgshow as shown above, and once that's working move on to writing and configuring your own program to use Hotmail. The code fragment shown above for connecting to Gmail will also work for connecting to Hotmail by simply changing the host name.</p> <p>To send a message through Hotmail, invoke smtpsend as follows:</p> <pre>java -Dmail.smtp.starttls.enable=true -Dmail.smtp.port=587 smtpsend -d -A -M smtp.live.com -U user@hotmail.com -P passwd someone@example.com</pre> <p>(Note that I split the command over three lines for display, but you should type it on one line.)</p> <p>The smtpsend program uses the System properties when creating the JavaMail Session, so the properties set on the command line will be available to the JavaMail Session.</p> <p>The smtpsend program will prompt for a subject and message body text. End the message body with ^D on UNIX or ^Z on Windows.</p> <p>Again, you can read the <code>smtpsend.java</code> source code to see how the command line arguments are used in the JavaMail API. The code fragment shown above for connecting to Gmail will also work for connecting to Hotmail by simply changing the host name and changing the connect call to <code>t.connect(host, 587, username, password)</code>. There is, of course, more than one way to use the JavaMail API to accomplish the same goal. This should help you understand the essential configuration parameters necessary to use Hotmail.</p> </blockquote>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload