Programming help - libraries for sending emails

GEC: Discuss gaming, computers and electronics and venture into the bizarre world of STGODs.

Moderator: Thanas

Post Reply
User avatar
Sarevok
The Fearless One
Posts: 10681
Joined: 2002-12-24 07:29am
Location: The Covenants last and final line of defense

Programming help - libraries for sending emails

Post by Sarevok »

I know there are some programmers on this forum so I am asking for help here. I am working on an app that needs to send emails using a gmail account. When it comes to apps like this I am a total newbie. I tried some of the SMTP mail libraries I found the web but none of them worked. It would be very helpful if someone could point out a library that would do what I wanted. My needs are simple. The app only needs to send email using an exisiting account. Nothing more than that.
I have to tell you something everything I wrote above is a lie.
nickolay1
Jedi Knight
Posts: 553
Joined: 2005-05-25 12:42am
Location: Marietta, GA

Post by nickolay1 »

SMTP is a fairly simple protocol, so you shouldn't have much difficulty implementing your own functions for sending mail.

http://en.wikipedia.org/wiki/Smtp contains some information to get you started.
User avatar
Sarevok
The Fearless One
Posts: 10681
Joined: 2002-12-24 07:29am
Location: The Covenants last and final line of defense

Post by Sarevok »

Destructionator XIII wrote:What language / platform are you using? Windows, Linux, Mac, .NET? C, C++, C#?
Shit I forgot to mention this uttermost important detail. :oops:

I am using C++. Development suite is Visual Studio.NET.
I have to tell you something everything I wrote above is a lie.
User avatar
ThatGuyFromThatPlace
Jedi Knight
Posts: 691
Joined: 2006-08-21 12:52am

Post by ThatGuyFromThatPlace »

Visual studio 2005 is free on the web and comes with a pretty comprehensive library. I've had great success using it with c++
[img=right]http://www.geocities.com/jamealbeluvien/revolution.jpg[/img]"Nothing here is what it seems. You are not the plucky hero, the Alliance is not an evil empire, and this is not the grand arena."
- The Operative, Serenity
"Everything they've ever "known" has been proven to be wrong. A thousand years ago everybody knew as a fact, that the earth was the center of the universe. Five hundred years ago, they knew it was flat. Fifteen minutes ago, you knew we humans were alone on it. Imagine what you'll know tomorrow."
-Agent Kay, Men In Black
User avatar
phongn
Rebel Leader
Posts: 18487
Joined: 2002-07-03 11:11pm

Post by phongn »

ThatGuyFromThatPlace wrote:Visual studio 2005 is free on the web and comes with a pretty comprehensive library. I've had great success using it with c++
The Express Editions may be free, but VS 2005 itself is not.
User avatar
Faqa
Jedi Master
Posts: 1340
Joined: 2004-06-02 09:32am
Contact:

Post by Faqa »

Is this MANAGED c++, or unmanaged?

If managed, you can use the .NET libraries, which make it simple. If not, yeah, probably roll your own.
"Peace on Earth and goodwill towards men? We are the United States Goverment - we don't DO that sort of thing!" - Sneakers. Best. Quote. EVER.

Periodic Pwnage Pantry:

"Faith? Isn't that another term for ignorance?" - Gregory House

"Isn't it interesting... religious behaviour is so close to being crazy that we can't tell them apart?" - Gregory House

"This is usually the part where people start screaming." - Gabriel Sylar
User avatar
Pu-239
Sith Marauder
Posts: 4727
Joined: 2002-10-21 08:44am
Location: Fake Virginia

Post by Pu-239 »

http://libsmtp.berlios.de/ ?
You might have to do some porting to windows.

ah.....the path to happiness is revision of dreams and not fulfillment... -SWPIGWANG
Sufficient Googling is indistinguishable from knowledge -somebody
Anything worth the cost of a missile, which can be located on the battlefield, will be shot at with missiles. If the US military is involved, then things, which are not worth the cost if a missile will also be shot at with missiles. -Sea Skimmer


George Bush makes freedom sound like a giant robot that breaks down a lot. -Darth Raptor
User avatar
ThatGuyFromThatPlace
Jedi Knight
Posts: 691
Joined: 2006-08-21 12:52am

Post by ThatGuyFromThatPlace »

phongn wrote:
ThatGuyFromThatPlace wrote:Visual studio 2005 is free on the web and comes with a pretty comprehensive library. I've had great success using it with c++
The Express Editions may be free, but VS 2005 itself is not.
true, but the express edition still comes with a pretty sweet library. It's what I use that thing has saved me practically days of coding on many programs
[img=right]http://www.geocities.com/jamealbeluvien/revolution.jpg[/img]"Nothing here is what it seems. You are not the plucky hero, the Alliance is not an evil empire, and this is not the grand arena."
- The Operative, Serenity
"Everything they've ever "known" has been proven to be wrong. A thousand years ago everybody knew as a fact, that the earth was the center of the universe. Five hundred years ago, they knew it was flat. Fifteen minutes ago, you knew we humans were alone on it. Imagine what you'll know tomorrow."
-Agent Kay, Men In Black
User avatar
phongn
Rebel Leader
Posts: 18487
Joined: 2002-07-03 11:11pm

Post by phongn »

ThatGuyFromThatPlace wrote:true, but the express edition still comes with a pretty sweet library. It's what I use that thing has saved me practically days of coding on many programs
Don't the VSEEs link to the .NET Framework?
User avatar
Faqa
Jedi Master
Posts: 1340
Joined: 2004-06-02 09:32am
Contact:

Post by Faqa »

Don't the VSEEs link to the .NET Framework?
The difference between express and full is mainly in developemental aids. It's still the .NET Framework underneath. You could write it in notepad and MS's free DL of the framework if you want to.

That said, if this IS managed C++, the matter is easy. Just set up your network credentials, and you can practically fill in the blanks. All under System.Web.Mail in .NET 1.1.

If you're using .NET 2.0, System.Net.Mail is even simpler.

Either way, set up the credentials, use the pre-made MailMessage class, and send it off to the server.
"Peace on Earth and goodwill towards men? We are the United States Goverment - we don't DO that sort of thing!" - Sneakers. Best. Quote. EVER.

Periodic Pwnage Pantry:

"Faith? Isn't that another term for ignorance?" - Gregory House

"Isn't it interesting... religious behaviour is so close to being crazy that we can't tell them apart?" - Gregory House

"This is usually the part where people start screaming." - Gabriel Sylar
Post Reply