C++ Email/SMTP - c++

Hey, Can you recommend me what C++ library or classes are available for sending email via SMTP in C++. I'm on Windows platform. I need a library which supports attachments and SSL connections. What are the options available. I'm not into implementing my own :)
Regards
EDIT: Oh I forgot to mention I'm using Visual C++ 6

I found a project that might be what you're looking for: lib smtp.

I've had good luck with the ATL class CSMTPConnection, but I don't think it supports SSL.

Try Ultimate-TCP/IP, free on Code Project - it includes support for SMTP and you can just compile in the parts you want. It's very good.

You don't need any library. (never on Windows)
Just use Winsock or COM

Related

C++ Downloading File with Pause/Resume controls

Is there a simple library that I can use to download files Asynchronously from the internet with pause/resume controls.
You didn't mention OS you use. In case of Linux/Unix you can use libcurl. This library is pretty simple in usage and powerful at the same time. It has curl_easy_pause method that does pausing and unpausing of current connection. Please see details at http://curl.haxx.se/libcurl/c/curl_easy_pause.html. Here you can find examples of working with libcurl.
For c++ you may see my library sample : main.cpp

Library to download a file from a web site?

Say I have this file:
http://www.example.com/somepic.png
Is there a cross platform C or C++ library that could easily allow me to download it to a specified directory?
Thanks
You can use libcurl to do this.
Besides itself, the GNU libmicrohttpd Web site lists several alternatives.

C++ Library for TCP/IP Like WebClient/HttpWebRequest in C#

Is there any C++ Library that can download data from internet when we provide a URL? I am currently learning C++ and wish to start from making use of such library in my application. Please help.
Thanks
Yes, libcurl.

Cross-platform support for various MFC\ATL classes

I'm trying to keep my C++ project cross-platform as much as possible.Albeit I do have dependencies on the following MFC\ATL classes: CString, CTime, CTimeSpan.
Is there an open implementation somewhere of MFC\ATL classes?
How common are these packages and should I use the open source libraries to start with, or should I wait until the need arises?
Instead of CString use std::string
Instead of CTime use boost::ptime
Instead of CTimeSpan use boost::time_duration
While this proposal won't answer your cross platform requirement, it does meet the request for an "open implementation of MFC/ATL classes".
Check out the Windows Template Library(WTL).
Microsoft open sourced it some years ago, you can download it from its sourceforge project page, and it's also available from Microsoft's website somewhere.
The description from the SourceForge page:
Windows Template Library (WTL) is a C++ library for developing Windows applications and UI components. It extends ATL (Active Template Library) and provides a set of classes for controls, dialogs, frame windows, GDI objects, and more.
Hope this helps!
I recommend not to rely in those classes. They are specific of MFC/ATL, and won't be easily ported to Unixes, for example. Try to build a separate conversion layer, and try to build around boost libraries, much more portable.

What API/SDK to use for this Windows Application?

I'm going to create a utility with GUI that will run on Windows operating systems.
It should require minimum (or zero!) amount of additional libraries, files or DLLs to run because it will be executed from an installer. Because of this, i don't want to use .NET for it will require user to install .NET Framework. I know today, most of Windows installed system come with .NET Framework but in my case i cannot be sure.
The utility will...
send some data to a web site and
parse the returning data,
collect some hardware info, like MAC address,
CPU type and make, hard-disk serial
number
I suppose native Win32 API could be used for all of those above, but instead of hassling with Win32, i'd prefer using a more developer friendly API, or SDK.
Thanks in advance.
Win32 API is the only way, and of course there are standard API - for sending data over the internet, you could use WinInet.lib/dll, to obtain information about the MAC, you could use the GetAdaptersInfo by using Iphlpapi.lib/dll,(here's a link on how to use it) for the Hard disk serial number you could use GetVolumeInformation by using kernel32.lib/dll. For the CPU Id, you might look into GetSystemInfomation
Edit: There's a C++ code, but you can easily derive a wrapper from this site Unfortunately, with WinAPI is not easy, no such thing as RAD with WinAPI but what you gain out of it is lightweight code instead of relying on SDK's, frameworks and dragging buggy dll's around with your application.
Hope this helps,
Best regards,
Tom.
You can statically link most C++ GUI libraries - even MFC. Personally, I recommend WTL, wihich is very light and header-only.
If what you want is minimum dependency with external files or DLLs you could statically compile all the required DLLs with the tool exe. Then you could use something like Visual C++ to develop such tool.
WTL is perfect for this sort of application and I am surprised more people aren't recommending it. You can also statically link with the CRT and hey presto - no dependencies and a very small EXE.
Delphi (now by Embarcadero) would do the job, creating a .exe file with no dependencies, and it is much easier to work with than the raw Win32 API.
If you don't like Object Pascal, you could try C++ Builder instead.
For the GUI you can either build your application with MFC (statically linked) or use a HTML based dialog that you can interact with using COM. (It is even possible to interact with javascript present in the page displayed by the dialog).
For the specific requirement that you do have, I feel Win32 API is the only way out.
Use MFC and statically link to it. No runtime dependancies need to be installed.