Emails in C++

Started by
58 comments, last by jbadams 16 years, 2 months ago
I been doing some searching and I have not fount any thing that can give me a sample of how to send a email in C++. Thanks again Joe
Advertisement
That's probably because C++ has no concept of "email". However, you can write code to do this, but it will require knowledge of network programming. You will need to open a socket to an email server (usually port 25), and then communicate with it using the Simple Mail Transfer Protocol (SMTP).
"When you die, if you get a choice between going to regular heaven or pie heaven, choose pie heaven. It might be a trick, but if it's not, mmmmmmm, boy."
How to Ask Questions the Smart Way.
You're probably referring to the email function that is available in PHP. The PHP function will either call a local MTA to send the email, or will act as a MTA itself.

Regardless, you should regard C++ not to have an MTA available, as the majority of OSes don't (Windows being a prime example). SMTP protocol is not complex, in fact, it's human readable. If you wanted to, you could telnet emails.
We should do this the Microsoft way: "WAHOOOO!!! IT COMPILES! SHIP IT!"
Sorry, I guess that too complexed for me. I was hoping there would be an easy way of doing it in c++

Thanks
You are using the wrong language if you want to be able to easily program tasks like sending e-mails and the like.
Not realy, I just wanted to know if there was an easy way of doing it, So I could add that option to some of my projects.

Quote:Original post by bigjoe11a
Not realy, I just wanted to know if there was an easy way of doing it, So I could add that option to some of my projects.


Really, it isn't much more difficult than to program than downloading a file from the web. There are also a couple of C++ SMTP libraries on the web that simplify it to the level of php.

Tristam MacDonald. Ex-BigTech Software Engineer. Future farmer. [https://trist.am]

Well Thats fine. I just don't know how to use them

If you download install and experiment with them, eventually you will understand through usage. There are no magic books or articles which can explain. It will take some doing but you will learn what you need through doing it.

Don't thank me, thank the moon's gravitation pull! Post in My Journal and help me to not procrastinate!
Quote:Original post by speciesUnknown
If you download install and experiment with them, eventually you will understand through usage. There are no magic books or articles which can explain. It will take some doing but you will learn what you need through doing it.


Thanks. Downloading them is the easy part. Just finding out what to download. and How to set it up. That would take some doing. I have to try and find some help on this.

Thanks


This topic is closed to new replies.

Advertisement