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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T15:15:16+00:00 2026-05-16T15:15:16+00:00

is there any windows api that can send mail using smtp along with attachment

  • 0

is there any windows api that can send mail using smtp along with attachment.
I have heard its not possible,and i have to use other socket methods,if its true how can I do that??

please suggest c++ or c solution only,no c# or java(like system.net.mail etc)

  • 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-16T15:15:16+00:00Added an answer on May 16, 2026 at 3:15 pm

    This is one of those places that (at least in my experience) you’re better off without libraries. Microsoft provides (at least) MAPI, Simple MAPI, and CDO as ways of sending email. Unfortunately, at least in my experience all of them (especially MAPI) are considerably more complex than doing the job on your own.

    At least as long as you’re dealing with an unsecured email connection, doing the job without a library is pretty simple: connect to the server on port 25. Send it a few strings and the email. When you get down to it, the “Simple” is “Simple Mail Transfer Protocol” is completely warranted — it really is pretty simple to do.

    If you want to do a secure connection you’ll almost certainly want to use a library for that though — creating a secure connection is a decidedly non-trivial task. Since you’re using Windows, the obvious choice would be InternetOpen and InternetConnect. Contrary to the documentation, InternetConnect will let you create a connection on almost any port. It only lists a half dozen possibilities or so, but if you just pass an actual port number, such as 465 or 587, that should work — though there are a few ports WinInet blocks as a (probably ineffective) security measure.

    Dealing with an attachment is a (mostly) separate question. An attachment simply ends up as text in the body of the email, with enough of a header to tell the receiving email program to interpret it as an attachment instead of text. There are three reasonably popular possibilities: BinHex, UUencode, and MIME. If you just want to do simple attachments, UUencode is probably the way to go. MIME is more capable, but considerably more complex. The main reason to use it would be if you wanted to do things other than simple attachments (e.g., email with files embedded rather than attached). BinHex is marginally simpler to implement, but wastes more space — the primary reason to use it is for a few ancient email clients that can’t handle anything else.

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

Sidebar

Related Questions

Are there any tools/libraries on Windows that can help me tarck down the culprit?
Is there any API or tool that can automate software updating? It should take
Is there any API for writing a C# program that could interface with Windows
I was wondering if there is a Windows API that can tell me if
Is there a Windows API or any way to determine on which physical processor/core
Is there any way to bind two windows from seprate processes together using Python/Pygame?
Is there any framework I can Instal on windows azure and get a service
Is there an application that can monitor the network and API usage of an
we have an APP, that uses many local resources, such as windows printing API,
Are there any functions that allow you to create shortcuts in Windows just like

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.