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 7506175
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T22:10:28+00:00 2026-05-29T22:10:28+00:00

I can send from Yahoo and Gmail, but no matter what I do I

  • 0

I can send from Yahoo and Gmail, but no matter what I do I can’t send from hotmail.

public class LiveSenderActivity extends javax.mail.Authenticator {
private String mailhost = "smtp.live.com";
private String user;
private String password;
private Session session;

static {
    Security.addProvider(new com.provider.JSSEProvider());
}

public LiveSenderActivity(String user, String password) {
    this.user = user;
    this.password = password;

    // This connects to the actual mailserver
    Properties props = new Properties();
    props.setProperty("mail.transport.protocol", "smtp");
    props.setProperty("mail.host", mailhost);
    props.put("mail.smtp.port", "587");
    props.put("mail.smtp.starttls.enable", "true");
    props.put("mail.smtp.auth", "true");

    props.put("mail.smtp.socketFactory.port", "587");
    props.put("mail.smtp.socketFactory.class",
            "javax.net.ssl.SSLSocketFactory");
    props.put("mail.smtp.socketFactory.fallback", "false");
    props.setProperty("mail.smtp.quitwait", "false");

    session = Session.getDefaultInstance(props, this);
}

I’ve tried with and without the SSL stuff, and with port 25 instead of 587… Nothing.

Am I doing something wrong? Like I said, yahoo and gmail work like a charm, but not this..

Its not giving me any errors either..

  • 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-05-29T22:10:31+00:00Added an answer on May 29, 2026 at 10:10 pm

    Does this JavaMail FAQ entry help?

    JavaMail 1.4 is capable of sending and reading messages using Hotmail. All that’s required is to properly configure JavaMail. I’ll illustrate the proper configuration using the demo programs that come with JavaMail – msgshow.java and smtpsend.java.

    Let’s assume your Hotmail username is "user@hotmail.com" and your password is "passwd".

    To read mail from your Hotmail Inbox, invoke msgshow as follows:

    java msgshow -D -T pop3s -H pop3.live.com -U user@hotmail.com -P passwd
    

    By reading the msgshow.java source code, you can see how these command line arguments are used in the JavaMail API. You should first try using msgshow as shown above, and once that’s working move on to writing and configuring your own program to use Hotmail. The code fragment shown above for connecting to Gmail will also work for connecting to Hotmail by simply changing the host name.

    To send a message through Hotmail, invoke smtpsend as follows:

    java -Dmail.smtp.starttls.enable=true -Dmail.smtp.port=587 smtpsend
         -d -M smtp.live.com -U user@hotmail.com -P passwd
         -A someotheruser@hotmail.com
    

    (Note that I split the command over three lines for display, but you should type it on one line.)

    The smtpsend program uses the System properties when creating the JavaMail Session, so the properties set on the command line will be available to the JavaMail Session.

    The smtpsend program will prompt for a subject and message body text. End the message body with ^D on UNIX or ^Z on Windows.

    Again, you can read the smtpsend.java source code to see how the command line arguments are used in the JavaMail API. The code fragment shown above for connecting to Gmail will also work for connecting to Hotmail by simply changing the host name and changing the connect call to t.connect(host, 587, username, password). There is, of course, more than one way to use the JavaMail API to accomplish the same goal. This should help you understand the essential configuration parameters necessary to use Hotmail.

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

Sidebar

Related Questions

I'm working with a program that can send email supporting yahoo mail and gmail.
How can I send an e-mail from a vbs script - on a machine
I need to send mail using Gmail SMTP, but it's showing Failure sending mail.
I can get both System.Net.Mail and System.Web.Mail to work with GMail, but I can't
i would like to import contacts from gmail/hotmail/yahoo to my php applications just like
I need to import contacts from hotmail,yahoo, gmail etc and I am plan to
how i can send key from my C# program to external program ? ex:
how i can send sms from asp.net?any idea about it?or any resource through which
How can I send email from a Wicket application?
How can i send an array from the masterViewController to the DetailViewController in a

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.