|
-
July 19th, 2012, 08:01 AM
#1
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
-
July 19th, 2012, 08:09 AM
#2
Re: Send_Email
after some tweaking i fixed some errors
-
July 19th, 2012, 08:26 AM
#3
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.
Please, correct me. I'm just learning.... and sorry for my english :-)
-
July 19th, 2012, 09:06 AM
#4
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
Last edited by flex567; July 19th, 2012 at 09:44 AM.
-
July 20th, 2012, 03:08 AM
#5
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.
Please, correct me. I'm just learning.... and sorry for my english :-)
-
July 20th, 2012, 04:52 AM
#6
Re: Send_Email
Actually now it works.
I dont really know why is there a setSSLOnConnect function instead setSSL on their webpage.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|