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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T01:23:35+00:00 2026-05-22T01:23:35+00:00

Using MS Visual C++ and Boost asio, I’m trying to add the ability to

  • 0

Using MS Visual C++ and Boost asio, I’m trying to add the ability to send email to an application using the SMTP protocol.

The problem arises when I try to authenticate the connection. Here is a snapshot of the situation supposing the attempts to connect to an account in a server of the 1&1 provider, which uses its own server named “nemesis”.

(S: server response and C: is the client-command) for test purposes, we assume that try to send a message from the account sender@mysite.com to target@mysite.com

C:    connect with hostname <smtp.1and1.es> and port <587> 
S:    220 smtp.1and1.es (mreu1) Welcome to Nemesis ESMTP server
C:    EHLO mysite.com
S:    250-smtp.1and1.es
S:    250-STARTTLS
S:    250-AUTH LOGIN PLAIN
S:    250-AUTH=LOGIN PLAIN
S:    250-PIPELINING
S:    250-SIZE 120000000
S:    250 HELP
C:    AUTH LOGIN
S:    504 Unknown authentication mechanism

As far as I know, the server offers two authentication modes to the user: LOGIN and PLAIN, and we try to use the former (the most used mode).

Supposedly, from this point, the server should answer with the requests of Username and Password. Some as:

S:    334 VXNlcm5hbWU6
C:    avlsdkfj          <- Usename (base-64 encoded)
S:    334 UGFzc3dvcmQ6
C:    lkajsdfvlj        <- Password (base-64 encoded)

I’ve tried the command auth login (lower case) and auth=login without success.

I supposed that once obtained, the access the rest of the process is standard. Is to say some as:

C:    "MAIL FROM:<....>\r\n"
S:    250 .....
C    "RCPT TO:  ..\r\n"
S:    250 ...
C:    "DATA\r\n"
S:    354 ...
C:    bla, bla, bla        <-  message- body
C:    \r\n.\r\n
S:    250 ...
C:    "QUIT\r\n"
S:    221 ...
  • 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-22T01:23:35+00:00Added an answer on May 22, 2026 at 1:23 am

    As usual, sometimes the most obvious is the last hypothesis. In my problem, I was using a plain command

    C: AUTH LOGIN
    

    instead of

    C: AUTH LOGIN\r\n
    

    Note that you don’t need append \r\n when using Telnet in Windows.

    Be aware of use the same appendix when sending the encoded user-name and password.

    By the way, besides the received comments, the page of Erwin Hoffmann SMTP Authentication Tutorial was a greath help to me.

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

Sidebar

Related Questions

Unlike this question: Linker Error while building application using Boost Asio in Visual Studio
I am trying to compile Boost 1.47 for x86 Windows CE using Visual Studio
I am learning how to use the boost asio libraries and I am using
I am using boost::interprocess::message_queue, with VC++ (in Microsoft Visual Studio 2005). It is working
I'm just getting started with Boost for the first time, details: I'm using Visual
I want to get started using Boost. I'm programming a C++ program in Visual
Using Visual Studio 2008 and Boost Libraries 1.46.1 I want to compile and link
I am using Boost with Visual Studio 2008 and I have put the path
I just started writing a small application in C++ using Visual Studio C++ 2008
I have a small single-threaded C++ application, compiled and linked using Visual Studio 2005,

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.