marjanaz / javamail-android Goto Github PK
View Code? Open in Web Editor NEWAutomatically exported from code.google.com/p/javamail-android
Automatically exported from code.google.com/p/javamail-android
Well i had studied javamail and trying in android but while i am running the
code i m getting error ...
05-06 10:07:45.160: ERROR/Mail app(602):
com.sun.mail.smtp.SMTPSendFailedException: 530 5.7.0 Must issue a STARTTLS
command first. q5sm1883105pbp.65
05-06 10:07:45.160: ERROR/Mail app(602): at
com.sun.mail.smtp.SMTPTransport.issueSendCommand(SMTPTransport.java:1515)
05-06 10:07:45.160: ERROR/Mail app(602): at
com.sun.mail.smtp.SMTPTransport.mailFrom(SMTPTransport.java:1054)
05-06 10:07:45.160: ERROR/Mail app(602): at
com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:634)
05-06 10:07:45.160: ERROR/Mail app(602): at
javax.mail.Transport.send0(Transport.java:189)
05-06 10:07:45.160: ERROR/Mail app(602): at
javax.mail.Transport.send(Transport.java:118)
05-06 10:07:45.160: ERROR/Mail app(602): at
com.livesoft.user.mail.Main$1.onClick(Main.java:49)
05-06 10:07:45.160: ERROR/Mail app(602): at
android.view.View.performClick(View.java:2408)
05-06 10:07:45.160: ERROR/Mail app(602): at
android.view.View$PerformClick.run(View.java:8816)
05-06 10:07:45.160: ERROR/Mail app(602): at
android.os.Handler.handleCallback(Handler.java:587)
05-06 10:07:45.160: ERROR/Mail app(602): at
android.os.Handler.dispatchMessage(Handler.java:92)
05-06 10:07:45.160: ERROR/Mail app(602): at
android.os.Looper.loop(Looper.java:123)
05-06 10:07:45.160: ERROR/Mail app(602): at
android.app.ActivityThread.main(ActivityThread.java:4627)
05-06 10:07:45.160: ERROR/Mail app(602): at
java.lang.reflect.Method.invokeNative(Native Method)
05-06 10:07:45.160: ERROR/Mail app(602): at
java.lang.reflect.Method.invoke(Method.java:521)
05-06 10:07:45.160: ERROR/Mail app(602): at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
05-06 10:07:45.160: ERROR/Mail app(602): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
05-06 10:07:45.160: ERROR/Mail app(602): at
dalvik.system.NativeStart.main(Native Method)
here is my code :
addImage.setOnClickListener(new OnClickListener(){
public void onClick(View arg0) {
// TODO Auto-generated method stub
String host= "smtp.gmail.com";
String to="[email protected]";
String from = "[email protected]";
Properties props= new Properties();
props.setProperty("mail.smtp.host", host);
Session session = Session.getDefaultInstance(props);
try{
MimeMessage msg = new MimeMessage(session);
msg.setFrom(new InternetAddress(from));
msg.addRecipient(Message.RecipientType.TO, new InternetAddress(to));
msg.setSubject("Hi..");
msg.setText("Test mail");
Transport.send(msg);
Toast.makeText(Main.this, "Email send succesfully", Toast.LENGTH_LONG).show();
}
catch(Exception e){
Log.e("Mail app","there is problem in sending mail",e);
}
}
});
please help me
Original issue reported on code.google.com by [email protected]
on 6 May 2011 at 4:42
Unable to execute dex: Multiple dex files define
Lorg/apache/harmony/awt/internal/nls/Messages
Original issue reported on code.google.com by [email protected]
on 6 Oct 2014 at 11:08
Attachments:
What steps will reproduce the problem?
1. Download r4
2. Try to compile the "additionnal" (sic) module against the the 1.1
Android SDK.
What is the expected output? What do you see instead?
Instead of a compiled JAR, the build fails with many errors about missing
classes, e.g. in
additionnal/src/org/apache/harmony/awt/datatransfer/DataProxy.java:
BufferedImage and SystemFlavorMap.
Original issue reported on code.google.com by [email protected]
on 22 Oct 2009 at 7:11
Hi,
I am attempting to send emails from an app i've created on galaxy tab running
on android 3.2 but i am not having any luck. Are you able to assist please?
Some output
01-21 00:12:38.210: I/System.out(3725): DEBUG: JavaMail version 1.4.1 01-21
00:12:38.210: I/System.out(3725): DEBUG: not loading file:
/system/lib/javamail.providers 01-21 00:12:38.210: I/System.out(3725): DEBUG:
java.io.FileNotFoundException: /system/lib/javamail.providers (No such file or
directory) 01-21 00:12:38.210: I/System.out(3725): DEBUG: !anyLoaded 01-21
00:12:38.210: I/System.out(3725): DEBUG: not loading resource:
/META-INF/javamail.providers 01-21 00:12:38.210: I/System.out(3725): DEBUG: not
loading resource: /META-INF/javamail.default.providers 01-21 00:12:38.210:
I/System.out(3725): DEBUG: failed to load any providers, using defaults 01-21
00:12:38.220: I/System.out(3725): DEBUG: Tables of loaded providers 01-21
00:12:38.220: I/System.out(3725): DEBUG: Providers Listed By Class Name:
{com.sun.mail.imap.IMAPStore=javax.mail.Provider[STORE,imap,com.sun.mail.imap.IM
APStore,Sun Microsystems, Inc.,1.4.1],
com.sun.mail.smtp.SMTPTransport=javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.
smtp.SMTPTransport,Sun Microsystems, Inc.,1.4.1],
com.sun.mail.pop3.POP3SSLStore=javax.mail.Provider[STORE,pop3s,com.sun.mail.pop3
.POP3SSLStore,Sun Microsystems, Inc.,1.4.1],
com.sun.mail.pop3.POP3Store=javax.mail.Provider[STORE,pop3,com.sun.mail.pop3.POP
3Store,Sun Microsystems, Inc.,1.4.1],
com.sun.mail.smtp.SMTPSSLTransport=javax.mail.Provider[TRANSPORT,smtps,com.sun.m
ail.smtp.SMTPSSLTransport,Sun Microsystems, Inc.,1.4.1],
com.sun.mail.imap.IMAPSSLStore=javax.mail.Provider[STORE,imaps,com.sun.mail.imap
.IMAPSSLStore,Sun Microsystems, Inc.,1.4.1]} 01-21 00:12:38.220:
I/System.out(3725): DEBUG: Providers Listed By Protocol:
{imaps=javax.mail.Provider[STORE,imaps,com.sun.mail.imap.IMAPSSLStore,Sun
Microsystems, Inc.,1.4.1],
smtp=javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun
Microsystems, Inc.,1.4.1],
pop3=javax.mail.Provider[STORE,pop3,com.sun.mail.pop3.POP3Store,Sun
Microsystems, Inc.,1.4.1],
pop3s=javax.mail.Provider[STORE,pop3s,com.sun.mail.pop3.POP3SSLStore,Sun
Microsystems, Inc.,1.4.1],
imap=javax.mail.Provider[STORE,imap,com.sun.mail.imap.IMAPStore,Sun
Microsystems, Inc.,1.4.1],
smtps=javax.mail.Provider[TRANSPORT,smtps,com.sun.mail.smtp.SMTPSSLTransport,Sun
Microsystems, Inc.,1.4.1]} 01-21 00:12:38.220: I/System.out(3725): DEBUG: not
loading resource: /META-INF/javamail.default.address.map 01-21 00:12:38.220:
I/System.out(3725): DEBUG: !anyLoaded 01-21 00:12:38.220: I/System.out(3725):
DEBUG: not loading resource: /META-INF/javamail.address.map 01-21 00:12:38.220:
I/System.out(3725): DEBUG: not loading file: /system/lib/javamail.address.map
01-21 00:12:38.220: I/System.out(3725): DEBUG: java.io.FileNotFoundException:
/system/lib/javamail.address.map (No such file or directory) 01-21
00:12:38.220: I/System.out(3725): DEBUG: failed to load address map, using
defaults 01-21 00:12:38.240: I/System.out(3725): DEBUG: getProvider() returning
javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun
Microsystems, Inc.,1.4.1]
***
DISCLAMER
This lib work for my basic usage.
I don't have time to fix bugs, feel free to contact me if you want to help
or send patch if you want !
***
Original issue reported on code.google.com by [email protected]
on 21 Jan 2012 at 1:19
Hi,
i get an error(Not trusted server certificate) ,when i use IMAP connect Gmail server in the mobile oem.
so ,i use explorer open the site:https://www.google.com, say not valid certificate yed
Original issue reported on code.google.com by [email protected]
on 29 Jun 2010 at 9:57
What steps will reproduce the problem?
1.Thread 1 is running and blocked in the IMAPFolder.idle method.
2.The underlying connection is some how broken but the idle command
doesn't know it so no exception is thrown.
3.Thread 2 calls into IMAPFolder.isOpen (1149) method, which takes the
IMAPFolder lock and then the messageCacheLock and calls
IMAPFolder.keepConnectionAlive (2671). That calls IMAPFolder.waitIfIdle
(2276) which detects it is idling, calls idleAbort and then calls wait on
the messageCacheLock. But it still holds the IMAPFolder lock.
4. Now Thread 1 gets the abort and throws an ConnectionException and calls
IMAPFolder.throwClosedException (2449) which requires the IMAPFolder lock,
but it can't have it because Thread 2 has it, and now we are deadlocked.
What is the expected output? What do you see instead?
Not a deadlock
What version of the product are you using? On what operating system?
Not sure, Jar doesn't have a version in it but it was the latest as of 2
weeks ago when I downloaded.
Please provide any additional information below.
I think either the throwClosedException shouldn't take the lock or there
should be a flag introduced to show that we are ending the idle on purpose
and hence we don't really care about the idle exception.
Original issue reported on code.google.com by [email protected]
on 10 Feb 2010 at 9:21
message.getContent() is causing the following issue.
java.lang.ClassCastException: com.sun.mail.imap.IMAPInputStream
someone can help?
Original issue reported on code.google.com by [email protected]
on 4 Jul 2013 at 7:31
Unable to build all files not check in into repository:
BUILD FAILED
java.io.FileNotFoundException:
/Users/Downloads/javamail-android-read-only/bootstrap/ant-common.xml (No such
file or directory)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:120)
at java.io.FileInputStream.<init>(FileInputStream.java:79)
at sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:70)
at sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:161)
at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrentEntity(XMLEntityManager.java:651)
at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.startEntity(XMLEntityManager.java:1313)
at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.startEntity(XMLEntityManager.java:1250)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEntityReference(XMLDocumentFragmentScannerImpl.java:1906)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:3033)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:647)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:140)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:511)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:808)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:119)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)
at org.apache.tools.ant.helper.ProjectHelper2.parse(ProjectHelper2.java:307)
at org.apache.tools.ant.helper.ProjectHelper2.parse(ProjectHelper2.java:178)
at org.apache.tools.ant.ProjectHelper.configureProject(ProjectHelper.java:82)
at org.apache.tools.ant.Main.runBuild(Main.java:793)
at org.apache.tools.ant.Main.startAnt(Main.java:217)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
Original issue reported on code.google.com by [email protected]
on 15 Feb 2013 at 1:38
When I call "BodyPart part = multipart.getBodyPart(idx);",
"java.lang.OutOfMemoryError" error occurs:
here is error log:
***
java.lang.OutOfMemoryError at
java.io.ByteArrayOutputStream.expand(ByteArrayOutputStream.java:91) at
java.io.ByteArrayOutputStream.write(ByteArrayOutputStream.java:216) at
com.sun.mail.pop3.Protocol.multilineCommand(Protocol.java:407) at
com.sun.mail.pop3.Protocol.retr(Protocol.java:276) at
com.sun.mail.pop3.POP3Message.getContentStream(POP3Message.java:145) at
javax.mail.internet.MimePartDataSource.getInputStream(MimePartDataSource.java:10
9) at javax.mail.internet.MimeMultipart.parsebm(MimeMultipart.java:726) at
javax.mail.internet.MimeMultipart.parse(MimeMultipart.java:466) at
javax.mail.internet.MimeMultipart.getBodyPart(MimeMultipart.java:255) at
***
Original issue reported on code.google.com by [email protected]
on 4 Aug 2013 at 9:28
Can this lib be used in commercial product without opensourcing the final
product?
This should be possible if choosing to license javamail-android under BSD.
The BSD-header can not be seen in the source files, can javamail-android be
licensed under BSD?
Original issue reported on code.google.com by [email protected]
on 15 Sep 2011 at 5:58
BUILD FAILED
java.io.FileNotFoundException:
/Users/jonasheyman/Downloads/javamail-android-read-only/bootstrap/ant-common.xml
(No such file or directory)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:120)
at java.io.FileInputStream.<init>(FileInputStream.java:79)
at sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:70)
at sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:161)
at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrentEntity(XMLEntityManager.java:651)
at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.startEntity(XMLEntityManager.java:1313)
at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.startEntity(XMLEntityManager.java:1250)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEntityReference(XMLDocumentFragmentScannerImpl.java:1906)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:3033)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:647)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:140)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:511)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:808)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:119)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)
at org.apache.tools.ant.helper.ProjectHelper2.parse(ProjectHelper2.java:307)
at org.apache.tools.ant.helper.ProjectHelper2.parse(ProjectHelper2.java:178)
at org.apache.tools.ant.ProjectHelper.configureProject(ProjectHelper.java:82)
at org.apache.tools.ant.Main.runBuild(Main.java:793)
at org.apache.tools.ant.Main.startAnt(Main.java:217)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
Original issue reported on code.google.com by [email protected]
on 15 Feb 2013 at 11:04
I have been using this client for my Android app , but now whenever some one
try to use this app the email is not sent and I get that there was a suspicious
lo-gin from some one .
Do you have any idea how can I fix this !!!
Thanks
Original issue reported on code.google.com by [email protected]
on 19 Aug 2014 at 5:58
I cannot authenticate with a hotmail address using JavaMail. I verified that I
can connect to smtp.live.com via telnet port 587. If I change:
host = "smtp.gmail.com" t.connect(host, username, password);
It connects to Gmail just fine on the default port and sends an email.
But if I change the code to:
host = "smtp.live.com" t.connect(host,587, username, password); It gives me the
following error:
javax.mail.MessagingException: Could not connect to SMTP host: smtp.live.com,
port: 587;
nested exception is:
java.io.IOException: SSL handshake failure: Failure in SSL library, usually a
protocol error
error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol
(external/openssl/ssl/s23_clnt.c:604 0xaf076228:0x00000000)
With session.setDebug(true) I get this info:
09-15 01:57:37.280: INFO/System.out(720): DEBUG: getProvider() returning
javax.mail.Provider[TRANSPORT,smtps,com.sun.mail.smtp.SMTPSSLTransport,Sun
Microsystems, Inc.,1.4.1] 09-15 01:57:37.300: INFO/System.out(720): DEBUG SMTP:
useEhlo true, useAuth true 09-15 01:57:37.310: INFO/System.out(720): DEBUG
SMTP: trying to connect to host "smtp.live.com", port 587, isSSL true 09-15
01:57:37.330: INFO/SSLSocketFactory(720): Using factory
org.apache.harmony.xnet.provider.jsse.OpenSSLSocketFactoryImpl@4007ed70 09-15
01:57:37.490: DEBUG/NativeCrypto(720): SSL_OP_NO_SSLv3 is set 09-15
01:57:37.538: ERROR/NativeCrypto(720): Unknown error 1 during connect
Looks like Hotmail isn't playing nice with OpenSSL. Does anyone have a solution
for this?
Below is the code to recreate the issue.
Thanks in advance,
J
String host = "smtp.live.com";
String username = foo@hotmail;
String password = "**";
Transport t = null;
Properties props = new Properties();
props.put("mail.smtps.auth", "true");
//props.put("mail.smtp.socketFactory.class", "javax.net.ssl.SSLSocketFactory");
Session session = Session.getInstance(props);
session.setDebug(true);
try{
MimeMessage msg = new MimeMessage(session);
msg.setSubject("Testing SMTP-SSL");
msg.setContent("This is a test", "text/plain");
msg.setFrom(new InternetAddress(username));
msg.setRecipients(Message.RecipientType.TO,
InternetAddress.parse(username, false));
t = session.getTransport("smtps");
t.connect(host,587, username, password);
t.sendMessage(msg, msg.getAllRecipients());
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
} finally {
try {
t.close();
} catch (MessagingException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
Original issue reported on code.google.com by [email protected]
on 3 Oct 2010 at 9:45
Android Lint (in Eclipse) gives following error:
Invalid package reference in library; not included in Android: java.awt.
Referenced from org.apache.harmony.awt.ContextStorage.
for additional.jar
Original issue reported on code.google.com by [email protected]
on 20 Oct 2013 at 11:46
Hi,
I just need to know if I can use this lib in a proprietary project.
If not, can u advise me on how to acomplish this by mylself?
Thanks
Original issue reported on code.google.com by [email protected]
on 11 Jun 2014 at 4:34
Can this actually be GPL licensed if it came from a JavaMail base?
Original issue reported on code.google.com by [email protected]
on 10 Feb 2011 at 3:58
i had use the same step in tutorial
add 3 file jar
teste send mail
but i just send mail 1 time,
my android os: android 4.0.4
Pls help me.
Thank you very much
Original issue reported on code.google.com by [email protected]
on 12 Apr 2013 at 10:33
Please, move project to Github. Project Hosting on Google Code will close on
January 25th, 2016.
Original issue reported on code.google.com by [email protected]
on 12 Apr 2015 at 12:35
I use Javamail for my e-mail exchange client on Android, and when I use
getMessages() to get all e-mails on my Inbox folder, I can't get old e-mails
that was read.
I've searched on google for solution but I can't find. Please help me.
Original issue reported on code.google.com by [email protected]
on 27 Jul 2011 at 7:42
Does anyone know how to download attachment??
I can use pop3 to download the whole email...
but how to separate the email content and attachment??
anyone hell??
Original issue reported on code.google.com by [email protected]
on 27 Mar 2010 at 5:08
What steps will reproduce the problem?
1.Connect to pop.gmail.com (110)
2.Get my store use POP3SSLStore
3.Get Inbox via store.getFolder("INBOX");
4.Get all messages via folder.getMessages();
What is the expected output?
I check my Inbox via google.mail, it have 1246 messages so
- The size of the folder (number of messages) should be return a 1246
or nearly. It means that: messages.length ~ 1246.
What do you see instead?
The number of messages be return is 250, even i try for another account,
it still return a number less than the correct number (let's 350/830).
What version of the product are you using? On what operating system?
- I use Android 1.5 (Google API)
- Tested on Ubuntu OS
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 23 Dec 2009 at 8:38
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.