Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9219663
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T03:10:00+00:00 2026-06-18T03:10:00+00:00

I am using this sample code: http://www.jondev.net/articles/Sending_Emails_without_User_Intervention_%28no_Intents%29_in_Android I am trying to use my own

  • 0

I am using this sample code:

http://www.jondev.net/articles/Sending_Emails_without_User_Intervention_%28no_Intents%29_in_Android

I am trying to use my own server email to send email without intent on Android.

I know that sample is configured to works only with Gmail.

I have changed:

    _host = "smtp.myserver.com"; // default smtp server 
    _port = "587"; // default smtp port 
    _sport = "587"; // default socketfactory port 

and this on MainActivity:

Mail m = new Mail("username@myserver.com", "password"); //to my sever email

I just set the right information on Outlook, and it works, I could send and receive from this email.

Server allow this setup:

POP3
SMTP
IMAP
WebMail
Mobile/PDA

Question:

I need to add/change something more? Or this sample can´t work with other then gmail.

I got this error on Logcat:

  01-31 21:07:08.989: E/MailApp(17094): Could not send email
    01-31 21:07:08.989: E/MailApp(17094): javax.mail.MessagingException: Could not connect to SMTP host: smtp.semhora.com, port: 587;
    01-31 21:07:08.989: E/MailApp(17094):   nested exception is:
    01-31 21:07:08.989: E/MailApp(17094):   javax.net.ssl.SSLProtocolException: SSL handshake aborted: ssl=0x1e4490: Failure in SSL library, usually a protocol error
    01-31 21:07:08.989: E/MailApp(17094): error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol (external/openssl/ssl/s23_clnt.c:683 0xad12957d:0x00000000)
    01-31 21:07:08.989: E/MailApp(17094):   at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1391)
    01-31 21:07:08.989: E/MailApp(17094):   at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:412)
    01-31 21:07:08.989: E/MailApp(17094):   at javax.mail.Service.connect(Service.java:310)
    01-31 21:07:08.989: E/MailApp(17094):   at javax.mail.Service.connect(Service.java:169)
    01-31 21:07:08.989: E/MailApp(17094):   at javax.mail.Service.connect(Service.java:118)
    01-31 21:07:08.989: E/MailApp(17094):   at javax.mail.Transport.send0(Transport.java:188)
    01-31 21:07:08.989: E/MailApp(17094):   at javax.mail.Transport.send(Transport.java:118)
    01-31 21:07:08.989: E/MailApp(17094):   at com.example.sendemailtester.Mail.send(Mail.java:102)
    01-31 21:07:08.989: E/MailApp(17094):   at com.example.sendemailtester.MainActivity$1.onClick(MainActivity.java:33)
    01-31 21:07:08.989: E/MailApp(17094):   at android.view.View.performClick(View.java:2485)
    01-31 21:07:08.989: E/MailApp(17094):   at android.view.View$PerformClick.run(View.java:9080)
    01-31 21:07:08.989: E/MailApp(17094):   at android.os.Handler.handleCallback(Handler.java:587)
    01-31 21:07:08.989: E/MailApp(17094):   at android.os.Handler.dispatchMessage(Handler.java:92)
    01-31 21:07:08.989: E/MailApp(17094):   at android.os.Looper.loop(Looper.java:130)
    01-31 21:07:08.989: E/MailApp(17094):   at android.app.ActivityThread.main(ActivityThread.java:3687)
    01-31 21:07:08.989: E/MailApp(17094):   at java.lang.reflect.Method.invokeNative(Native Method)
    01-31 21:07:08.989: E/MailApp(17094):   at java.lang.reflect.Method.invoke(Method.java:507)
    01-31 21:07:08.989: E/MailApp(17094):   at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:867)
    01-31 21:07:08.989: E/MailApp(17094):   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:625)
    01-31 21:07:08.989: E/MailApp(17094):   at dalvik.system.NativeStart.main(Native Method)
    01-31 21:07:08.989: E/MailApp(17094): Caused by: javax.net.ssl.SSLProtocolException: SSL handshake aborted: ssl=0x1e4490: Failure in SSL library, usually a protocol error
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T03:10:02+00:00Added an answer on June 18, 2026 at 3:10 am

    I’ve never used this wrapper, but the code is assuming SSL support while it appears your port 587 server does not support SSL. Comment out these 2 lines

    props.put("mail.smtp.socketFactory.port", _sport); 
    props.put("mail.smtp.socketFactory.class", "javax.net.ssl.SSLSocketFactory"); 
    

    and set this line from false to true

    props.put("mail.smtp.socketFactory.fallback", "false"); 
    

    That might help out.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

When trying to run the sample code here: http://www.nikhilk.net/Live-Search-REST-API.aspx I get: Error 52 The
I'm using drscheme from: http://www.archlinux.org/packages/extra/x86_64/drscheme/ I'm trying to work with the sample code in
How do I get radar images to a .Net program using this service: http://www.nws.noaa.gov/forecasts/xml/
Following this tutorial: http://www.vogella.de/articles/AndroidServices/article.html#receiver I created my own project. Manifest: <?xml version=1.0 encoding=utf-8?> <manifest
This is my sample code: <?xml version=1.0 encoding=utf-8?> <mx:WindowedApplication xmlns:mx=http://www.adobe.com/2006/mxml paddingBottom=0 paddingLeft=0 paddingRight=0 paddingTop=0/>
I'm using the WindowsMedia library found here: http://www.ernzo.com/soundstudio.aspx The sample code had the ability
I'm trying to apply the technique described in http://www.drdobbs.com/tools/227500449 With the sample code below,
I'm using this code for my web assignment: http://csstechniques.blogspot.sg/2007/05/super-simple-css-bars.html But how do I show
I've been using the sample code from this d3 project to learn how to
I've seen on this site a StringBuilder code sample illustrating AppendFormat usage: using System;

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.