-
Send_Email
hi,
Can somebody explain to me why this code wont compile, I would like to send an email with this program.
http://i47.tinypic.com/8wxnao.jpg
I got the program from here:
http://commons.apache.org/email/userguide.html
And additional classes from here:
http://www.findjar.com/jar/org/apach...l-1.1.jar.html
-
Re: Send_Email
after some tweaking i fixed some errors
-
Re: Send_Email
Hi,
Eclipse always (almost) gives an explanation about why a program doesn't compile in 'problems' tab. So, first read it.
If you still don't have a clue, post the error compiler says. With that information we'll be able to help you much better.
Anyway, in your case, I guess you missed import appropriate libraries to Main class. So, just import classes Email, SimpleEmail and DefaultAuthenticator.
Regards,
Albert.
-
Re: Send_Email
I added classes that was needed but it still won't work.
The problem is that function SetSSLOnConnect is undefined
The proposed solution is add cast to Email but even after casting it wont work.
http://i47.tinypic.com/2vd2rd5.png
-
Re: Send_Email
Hi,
I have never used that library. I use to work with Java Mail to send e-mails.
You are right, watching javadoc, it looks like there is no method setSSLOnConnect. Although I know nothing about such library, there is a method named setSSL(boolean), which seems to be very close to setSSLOnConnect. I'm just guessing, but try to replace setSSLOnConnect with setSSL function.
If it doesn't work either, just remove expression. Or do you really need SSL encryption?
Albert.
-
Re: Send_Email
Actually now it works.
I dont really know why is there a setSSLOnConnect function instead setSSL on their webpage.