Note that there are some explanatory texts on larger screens.

plurals
  1. PORead Inbox using Java
    primarykey
    data
    text
    <p>I am working in a company as an intern and everyone in the company uses outlook for mails. I couldn't figure out a way to read emails from the Inbox. </p> <p>Let me give a view about my project. I am using JavaMail API for mails.</p> <p>My first task - To send mails from java program using Reminder system, which I have successfully completed, by using the host, protocol, username and no password. There is no need of entering password, because if i try to enter the password it stopped working. Its working only without password.</p> <p>so basically, I can send email using other employees in the company using there email address as "From" because there is no password need to be entered, possible only from java program.</p> <p>My second task - To read the subject of the mail and the sender details and do some task...</p> <p>There is no password to enter, but </p> <pre><code>Store store = session.getStore("smtp"); //I tried with imap, pop3, but everything gives error "No Such Provided" store.connect("email@domain.co.uk", "PASSWORD"); </code></pre> <p>store.connect() doesn't allow me to use the method without password.</p> <p>The software will be using a new email address which is not the same address in users outlook but for testing I am using my email address first, because the software is going to be used by different users/computers.</p> <p>If i try this way</p> <pre><code>session.getStore("imaps"); store.connect("host","username","password"); Error: DEBUG: getProvider() returning javax.mail.Provider[STORE,imaps,com.sun.mail.imap.IMAPSSLStore,Sun Microsystems, Inc] DEBUG: mail.imap.fetchsize: 16384 DEBUG: mail.imap.statuscachetimeout: 1000 DEBUG: mail.imap.appendbuffersize: -1 DEBUG: mail.imap.minidletime: 10 DEBUG: trying to connect to host "host", port 993, isSSL true javax.mail.MessagingException: Connection refused: connect; nested exception is: java.net.ConnectException: Connection refused: connect at com.sun.mail.imap.IMAPStore.protocolConnect(IMAPStore.java:618) at javax.mail.Service.connect(Service.java:291) at javax.mail.Service.connect(Service.java:172) at TestMail.InboxReader.main(InboxReader.java:52) Caused by: java.net.ConnectException: Connection refused: connect at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:351) at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:213) at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:200) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366) at java.net.Socket.connect(Socket.java:529) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:570) at com.sun.net.ssl.internal.ssl.BaseSSLSocketImpl.connect(BaseSSLSocketImpl.java:141) at com.sun.mail.util.SocketFetcher.createSocket(SocketFetcher.java:284) at com.sun.mail.util.SocketFetcher.getSocket(SocketFetcher.java:227) at com.sun.mail.iap.Protocol.&lt;init&gt;(Protocol.java:109) at com.sun.mail.imap.protocol.IMAPProtocol.&lt;init&gt;(IMAPProtocol.java:104) at com.sun.mail.imap.IMAPStore.protocolConnect(IMAPStore.java:585) ... 3 more Java Result: 2 </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

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