Hi people, any help here would be great. Just so you know, this is my first venture into the JavaMail API. When i run my class below, a javax.mail.MessagingException is thrown, with the outptu [EOF]
Any ideas on why this is happening would be great. The trans connection to the smtpServer seems to be working fine, it is the sendMessage() method which i s throwing the exception
Inserting a call to " session.setDebug(true) " will cause lots of info about what's happening to be written to standard out; often that includes something that points to the problem.
Thanks Ulf, i identified the problem using the session debug. My coding was fine, i was trying to test it with an e-mail address using the worng protocol to connect to the server (i think!) Anyways, i am able to send e-mail via SMTP which is great.
I am however having a problem with retrieiving message from the server. I am able to retreive unread messages, but not read messages. the call to folder.getMessages() only seems to be retrieving unread messages
If you're going to be working with JavaMail, and you don't know much about how e-mail works, I would recommend you have a read through the JavaMail FAQ. The question you have asked is one of the many which is answered there.
Thanks Paul ive had a read through the FAQs. Ive found out that my messages are deleted from my server once they have been retrieved, which is why i cannot retrieve unread messages!
I though i had found a way around this using message FLAGS, but ive just read that pop3 doesnt support flags!
Would i be write in saying that the only way to access read e-mails would be to store them on the client machine once read?
Thanks
Dave
Could you hold this puppy for a sec? I need to adjust this tiny ad:
Gift giving made easy with the permaculture playing cards