The problem with it is that it requires the user to pick an email client, and then the user has to send it manually. I want it to send automatically, without notifying the user that the email was sent.
Does anyone have any suggestions?
Thanks,
Noam.
Noam Habot
Greenhorn
Joined: Apr 07, 2009
Posts: 5
posted
0
I have just found out that the new android sdk is not compatible with the JavaMail external .jar.
Is there a workaround for this? Is there a way to still get it to work?
Thanks,
Noam.
Rahul Ba
Ranch Hand
Joined: Oct 01, 2008
Posts: 201
posted
0
Hi,
Use Java Mail API. This is the standard while working on mail things in Java. Download this API, you will see two jar files in lib activation.jar and another mail.jar (I am not sure about the name for mail.jar). Keep these two jars in classpath and use API.
Everytime prefer to use API which is standard.
Let me know if you get the problem,
Noam Habot
Greenhorn
Joined: Apr 07, 2009
Posts: 5
posted
0
Thanks for your answer.
I have tried that, and when I import the external library into my application, it tells me:
[2009-04-08 13:49:56 - MyApp] warning: Ignoring InnerClasses attribute for an anonymous inner class that doesn't come with an associated EnclosingMethod attribute. (This class was probably produced by a broken compiler.)
Noam.
Rahul Ba
Ranch Hand
Joined: Oct 01, 2008
Posts: 201
posted
0
Somethig weired....try reinstalling jdk, your IDE
Noam Habot
Greenhorn
Joined: Apr 07, 2009
Posts: 5
posted
0
I have tried all that but it still didn't work.
Did you ever get it to work?
If so, what android sdk version did you use?
And if you used 1.0+, then could you please put up some code here that we can take a look at?
Thanks,
Noam.
Rahul Ba
Ranch Hand
Joined: Oct 01, 2008
Posts: 201
posted
0
Hi,
I have not worked on Android, but you will get similar code in java on net. There are many samples available on net.
Noam Habot
Greenhorn
Joined: Apr 07, 2009
Posts: 5
posted
0
That's the problem.
It seems that with Android, the JavaMail class does not work.
Have you find out the way to send Email with any API from emulator? I tried it with K-9(that was an APK file), but as you mentioned earlier it provides its own GUI to send email when i use intent, user have to send it manually. I tried with Java Mail API also, but no success at all. Please let us know whenever you get the way.
Have you find out the way to send Email with any API from emulator? I tried it with K-9(that was an APK file), but as you mentioned earlier it provides its own GUI to send email when i use intent, user have to send it manually. I tried with Java Mail API also, but no success at all. Please let us know whenever you get the way.
javamail.jar can't be used in android. Some classes those are not belong to android sdk were imported in the jar .So you have to clean up javamail.jar.
Regards,
Steven
This message was edited 1 time. Last update was at by Steven WangXiangJun
Steven WangXiangJun
Greenhorn
Joined: Nov 26, 2009
Posts: 2
posted
0
Finally I find the way to send emails on android via javamail.
click Here:http://code.google.com/p/javamail-android/downloads/list
Now,everything is ok!
Steven
Matt Farley
Greenhorn
Joined: Sep 17, 2010
Posts: 1
posted
0
After searching far and wide for a solution to this .. with the ability to add attachments .. I came across this (and it works!):