Jump to content
  • Advertisement
Sign in to follow this  
asdfwe

sending email through program

This topic is 3841 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Advertisement
What OS? What mail server? What exactly are you trying to do? If you have an SMTP server address, you can connect to it and send SMTP commands to send an E-mail. Is this to only run on one PC (E.g. a server of some sort), or is it to run on any PC?

Share this post


Link to post
Share on other sites

os: windows xp
i wanna send an email to myself at gmail.com
through a program in c++

what is SMTP ?????????

thanks

Share this post


Link to post
Share on other sites
Quote:
Original post by asdfwe

os: windows xp
i wanna send an email to myself at gmail.com
through a program in c++

what is SMTP ?????????

thanks
SMTP.

There's vaious libraries about that you can probably use, or you could do it yourself by opening a network connection to your SMTP server and sending the mail that way. If I were you, I'd google for "C++ SMTP library" or something.

Share this post


Link to post
Share on other sites
ok
i read about SMTP but cant understand much

is there some simpler way to send email through codes in c++

Share this post


Link to post
Share on other sites
Quote:
Original post by asdfwe
ok
i read about SMTP but cant understand much

is there some simpler way to send email through codes in c++
Yes, by getting a library that someone's already written. Sending E-mail a case of connecting to the correct mail server (For simplicities sake, it's much easier to connect to your ISPs mail server and use that to relay the E-mail), and communicating with the server to send the e-mail.

An example transation might go like so (Any line beginning with a number is sent by the server):
220 mc9-f15.hotmail.com Microsoft ESMTP MAIL Service, Version: 5.0.2195.6824 ready at Sun, 18 Apr 2004 06:34:34 -0700
HELO Someone or other
250 mc9-f15.hotmail.com Hello [82.41.45.74]
MAIL FROM: YourSourceAddres@YourDomain.com
250 YourSourceAddres@YourDomain.com....Sender OK
RCPT TO: someonehotmail.com
250 someonehotmail.com
DATA
354 Please start mail input.
I like pie.
Yum.
But not floorpei
.
250 Mail queued for delivery.
QUIT
221 Closing connection. Good bye.

Sending mail is a lot more complicated than just calling a function (Unless youre using another library to do it for you), since it involves betworking.

Share this post


Link to post
Share on other sites
it will be a great help if u could provide me with details of procedure of how to
begin writing a code in c++ that could send e mails to someone@gmail.com


Share this post


Link to post
Share on other sites
Quote:
Original post by asdfwe
it will be a great help if u could provide me with details of procedure of how to
begin writing a code in c++ that could send e mails to someone@gmail.com
So long as it's just gmail, you just need to connect to smtp.gmail.com on port 25, and start sending SMTP commands. I'd check out the Multiplayer and Network Programming Forum FAQ for links to various network libraries.

However, as I said, googling for an SMTP library may be quicker and easier.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!