0
我在網站上使用的電子郵件程序:Sending emails without User intervention。電子郵件程序工作,我不知道爲什麼
該程序運行沒有問題,並沒有崩潰,但電子郵件不會發送,我確實得到了我的日誌貓的錯誤列表,我不知道爲什麼。
我唯一的權限是互聯網,我不確定是否有任何其他我需要這個程序。
任何幫助將不勝感激,謝謝你的時間。
這裏是日誌的貓:
06-22 15:41:52.216: E/MailApp(675): Could not send email
06-22 15:41:52.216: E/MailApp(675): android.os.NetworkOnMainThreadException
06-22 15:41:52.216: E/MailApp(675): at android.os.StrictMode$AndroidBlockGuardPolicy.onNetwork(StrictMode.java:1099)
06-22 15:41:52.216: E/MailApp(675): at java.net.InetAddress.lookupHostByName(InetAddress.java:391)
06-22 15:41:52.216: E/MailApp(675): at java.net.InetAddress.getLocalHost(InetAddress.java:371)
06-22 15:41:52.216: E/MailApp(675): at javax.mail.internet.InternetAddress.getLocalAddress(InternetAddress.java:517)
06-22 15:41:52.216: E/MailApp(675): at javax.mail.internet.UniqueValue.getUniqueMessageIDValue(UniqueValue.java:99)
06-22 15:41:52.216: E/MailApp(675): at javax.mail.internet.MimeMessage.updateMessageID(MimeMessage.java:2054)
06-22 15:41:52.216: E/MailApp(675): at javax.mail.internet.MimeMessage.updateHeaders(MimeMessage.java:2076)
06-22 15:41:52.216: E/MailApp(675): at javax.mail.internet.MimeMessage.saveChanges(MimeMessage.java:2042)
06-22 15:41:52.216: E/MailApp(675): at javax.mail.Transport.send(Transport.java:117)
06-22 15:41:52.216: E/MailApp(675): at com.dummies.android.SuperMailTest3.Mail.send(Mail.java:106)
06-22 15:41:52.216: E/MailApp(675): at com.dummies.android.SuperMailTest3.SuperMailTest3Activity$1.onClick(SuperMailTest3Activity.java:41)
06-22 15:41:52.216: E/MailApp(675): at android.view.View.performClick(View.java:3511)
06-22 15:41:52.216: E/MailApp(675): at android.view.View$PerformClick.run(View.java:14105)
06-22 15:41:52.216: E/MailApp(675): at android.os.Handler.handleCallback(Handler.java:605)
06-22 15:41:52.216: E/MailApp(675): at android.os.Handler.dispatchMessage(Handler.java:92)
06-22 15:41:52.216: E/MailApp(675): at android.os.Looper.loop(Looper.java:137)
06-22 15:41:52.216: E/MailApp(675): at android.app.ActivityThread.main(ActivityThread.java:4424)
06-22 15:41:52.216: E/MailApp(675): at java.lang.reflect.Method.invokeNative(Native Method)
06-22 15:41:52.216: E/MailApp(675): at java.lang.reflect.Method.invoke(Method.java:511)
06-22 15:41:52.216: E/MailApp(675): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
06-22 15:41:52.216: E/MailApp(675): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
06-22 15:41:52.216: E/MailApp(675): at dalvik.system.NativeStart.main(Native Method)
非常感謝,幫助了很多哈哈! – user1457104