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

  • Home
  • SEARCH
  • 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 9065331
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T16:28:25+00:00 2026-06-16T16:28:25+00:00

Lets say I have a function like below that sends and receives info from

  • 0

Lets say I have a function like below that sends and receives info from a socket flawlessly..

The results are:

Connected to: 65.55.96.11 Port: 25
220 BLU0-SMTP374.blu0.hotmail.com Microsoft ESMTP MAIL Service, Version: 6.0.3790.4675 ready at  Mon, 31 Dec 2012 19:52:22 -0800 

250 BLU0-SMTP374.blu0.hotmail.com Hello [50.100.44.155]

220 2.0.0 SMTP server ready

Exception: Socket Error 10054: Connection reset by peer

Why do I get an exception? It throws the exception when I send the “DATA” string.

How do I login? I cannot seem to find out how anywhere online. I searched it and only see AUTH command but no usage or examples at all.

The code is below:

void SendEmail(std::string Username, std::string Password, std::string IP, std::string Port)
{
  Socket = CreateSocket;
  ConnectSocket(Socket, IP, Port);
  SetTimeout(Socket, 10000);
  SocketInfo(Socket, IP, Port);

  writeln("Connected to: " + IP + " Port: " + Port);
  writeln(RecvSocket(Socket));

  SendSocketEx(Socket, "HELO");    //SendSocketEx automatically adds \r\n to the end of a line..
  writeln(RecvSocket(Socket));

  SendSocketEx(Socket, "STARTTLS");
  writeln(RecvSocket(Socket));

  SendSocketEx(Socket, "MAIL FROM: mehwtfbleh@hotmail.com");
  writeln(RecvSocket(Socket));

  SendSocketEx(Socket, "VRFY mehwtfbleh@hotmail.com");
  writeln(RecvSocket(Socket));

  SendSocketEx(Socket, "RCPT TO: mehwtfbleh@hotmail.com");
  writeln(RecvSocket(Socket));

  SendSocketEx(Socket, "DATA");
  writeln(RecvSocket(Socket));

  SendSocketEx(Socket, "This Is The Body..");
  writeln(RecvSocket(Socket));

  SendSocketEx(Socket, "QUIT");
  writeln(RecvSocket(Socket));

  CloseSocket(Socket);
  FreeSocket(Socket);
}

int main()
{
    SendEmail("", "", "smtp.live.com", "25", "localhost");
}
  • 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-16T16:28:26+00:00Added an answer on June 16, 2026 at 4:28 pm

    The problem is that this server requires communication to occur over the TLS protocol. The STARTTLS command tells the server that all further communication will occur over the Secure Sockets Layer (SSL/TLS). Once this connection is established, all further communication between the 2 sides is encrypted.

    The easiest way to accomplish that is to use a library that implements SSL/TLS. The most famous library is OpenSSL.

    You can perform a quick test using OpenSSL from your terminal/console:

    openssl s_client -connect smtp.live.com:25 -starttls smtp -crlf
    

    Then you can send your commands:

    EHLO hotmail.com
    AUTH LOGIN (this depends on the methods supported by the server)
    ...
    MAIL FROM: <your email>
    RCPT TO: <recipient email>
    DATA
    All your SMTP are belong to us.
    .
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Lets say I have a recursive function that creates lists within lists. It return
Right now, lets say I have code much like this... $some_var=returnsUserInput(); function funcA($a) {...}
let's say I have a simple javascript like so: $(document).ready(function(){ if(login == 1) {
Lets say I have a few utility functions in file tests/utils/functions.js. I would like
Let's say I have some simple Javascript like: <script> var hello = function(){ alert(Hello
Lets say I have a function where the parameter is passed by value instead
Lets say I have a function f[x_, y_] , and two lists l1 ,
Lets say I have: class X { function a() { echo Hello, ; }
Lets say I have a class with a static function. This function is called
I have two aspx page on my application. From the first one, lets say

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.