Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411613 Posts in 69390 Topics- by 58447 Members - Latest Member: sinsofsven

May 10, 2024, 12:11:51 AM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsDeveloperTechnical (Moderator: ThemsAllTook)sending/receiving email
Pages: [1]
Print
Author Topic: sending/receiving email  (Read 1414 times)
brog
Level 7
**



View Profile WWW
« on: December 09, 2009, 04:14:10 AM »

I want to write a program which can send and receive email messages.  Because I'm lazy and I detest network programing, I don't want to implement SMTP/POP3/MIME myself straight on top of winsock.  But my searches for a library that does this for me have come up empty.  Well, not empty; full of so much crap that I can't sort out what's any good.

Anyone have any advice on libraries to use?  (Or you could tell me it's not actually so bad to do it myself.)
Logged
Ivan
Owl Country
Level 10
*


alright, let's see what we can see


View Profile
« Reply #1 on: December 09, 2009, 09:57:04 AM »

Maybe just use libcurl and do your email sending/receiving on a web server?
Logged

http://polycode.org/ - Free, cross-platform, open-source engine.
Tycho Brahe
Level 10
*****

λx.x


View Profile
« Reply #2 on: December 09, 2009, 03:19:29 PM »

Actually, I'm interested in doing this as well, has anyone had any experiences, good AND bad about sending/recieving email using c++
Logged
brog
Level 7
**



View Profile WWW
« Reply #3 on: December 09, 2009, 03:26:48 PM »

Maybe just use libcurl and do your email sending/receiving on a web server?

The point of this exercise is to not require a server.  I'm contemplating doing a play-by-email game.  I've been inspired by Solium Infernum, but the method that uses is a little absurd - you have to manually send attachments and then save them to the correct folder.  I'd like my game to send off your turn itself, and then be able to run in the background, check every so often, and then pop up a message when a new turn arrives.
Logged
Ivan
Owl Country
Level 10
*


alright, let's see what we can see


View Profile
« Reply #4 on: December 09, 2009, 11:24:05 PM »

Is there a reason to use such an archaic system though? Maybe you could do the same thing with something like twitter?
Logged

http://polycode.org/ - Free, cross-platform, open-source engine.
Tycho Brahe
Level 10
*****

λx.x


View Profile
« Reply #5 on: December 10, 2009, 03:16:24 AM »

To answer for him, he probably could, but not everyone has twitter, but everyone has email.
Logged
Ben Kuhn
Level 0
***


View Profile
« Reply #6 on: December 10, 2009, 07:36:57 PM »

Are you stuck with C++ for sure? Python's standard library includes POP, IMAP and SMTP libraries (and I'm sure Ruby and Perl do as well), so it's portable and you don't have to worry about external dependencies. Plus if it's a play-by-email thing you sure don't care about the loss in speed.

On the other hand, if you're dead set on C++, this page supplies a POP3 implementation: http://www.ddj.com/cpp/184404355. And Wikipedia says SMTP "is a relatively simple, text-based protocol", so shouldn't be too tough to roll your own.
Logged
brog
Level 7
**



View Profile WWW
« Reply #7 on: December 12, 2009, 09:33:25 AM »

Just because it's play-by-email doesn't mean I don't want 3d graphics with real-time lighting!

But yeah, it doesn't look too unreasonable to implement it myself.  Maybe I will.  Or maybe I'll set up Ruby or Python to be used as a scripting language with C++; I've always wanted an excuse to do that.  Sounds like fun, thanks for the advice.
It does seem weird that there isn't a standard email library for C++ though.
Logged
Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic