Solved

Sending e-mails from my application.

Posted on 2000-02-14
14
224 Views
Last Modified: 2013-11-20
I would like to send e-mail using my program. My application is for win 9x. user only have dial-up connection to intenet.(like aol,msn,...). I will assume that when sending mail, internet connection is up and running. I am using vc++ 6. Snippet of code or a link to a sample is appreciated.
0
Comment
Question by:Sadhu
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
  • 3
  • +3
14 Comments
 
LVL 86

Expert Comment

by:jkr
ID: 2519872
Well, the easiest approach would be to

ShellExecute ( NULL, "open", "mailto:recipient@domain.com", NULL, NULL, SW_SHOWNORMAL);

However, if you are interested in some details, see http://www.codeguru.com/internet/index.shtml for comprehensive descriptions...
0
 
LVL 1

Author Comment

by:Sadhu
ID: 2519972
Thank you for reply.

I will have just a textbox and user will insert text in it. My program will read e-mail addresses from database and send mail. I am expecting about 50 e-mail addresses, so it would not be practical to open 50 times default mail application..

0
 
LVL 1

Author Comment

by:Sadhu
ID: 2519979
Jkr,
I rejected your answer so I can get more opinion. If your answer is best I will give you points
0
Get MongoDB database support online, now!

At Percona’s web store you can order your MongoDB database support needs in minutes. No hassles, no fuss, just pick and click. Pay online with a credit card. Handle your MongoDB database support now!

 
LVL 23

Expert Comment

by:naveenkohli
ID: 2519990
Goto the following site on codeguru. Under the Email section you will find lots of samples om Email...

http://www.codeguru.com/internet/index.shtml 

Hope it helps!

Cheers!

0
 
LVL 86

Accepted Solution

by:
jkr earned 100 total points
ID: 2520170
At least naveenkohli agrees with me about the CodeGuru site ;-)
0
 
LVL 32

Expert Comment

by:jhance
ID: 2520195
I've used ASPMail from ServerObjects in a few projects and have had good results with it.

http://www.serverobjects.com/products.htm#aspmail

While it's primarily marketed as an ASP component, there is no problem using it from any development environment that supports COM.
0
 
LVL 23

Expert Comment

by:naveenkohli
ID: 2520207
Hi Jkr,
I never had any differences with you :-)
Infact i did not see that you have mentioned the codeguru site reference in your email... i guess its valentine day's chocolate effect:-)

Lator Gator :-)
0
 
LVL 86

Expert Comment

by:jkr
ID: 2520225
Ooops, is it valentine day? Am I supposed to buy flowers for our computers? <S>

0
 
LVL 23

Expert Comment

by:naveenkohli
ID: 2520231
I think we should buy flowers .. LOL
0
 

Expert Comment

by:Stevex2
ID: 2524839
The easiest way to do it is this way.

ShellExecute(NULL , "open", "mailto:soso@so.com?cc=soso1@so.com;soso2@so.com;soso3@so.com&subject=Hello%20World&body=I%20am%20here",NULL, NULL, SW_SHOWNORMAL);


Just keep adding the address's in with a semicolon seperator. Works well. If the semicolon itself dont work use the ascii equivalent behind a % sign as i did with the spaces above.
0
 
LVL 32

Expert Comment

by:jhance
ID: 2525004
Stevex2,

It looks like you're new here.  

"Stomping" on a question like this is incredibly bad form on your part, _ESPECIALLY_ when someone else has already offered the same answer.  You could at least have the courtesy to read through the earlier posts and add something new.  If you had taken the time to read through, you'd also have seen that the ShellExecute/mailto technique is NOT APPLICABLE to this situation.
0
 

Expert Comment

by:Stevex2
ID: 2525681
Sorry, Only tried to help with some code that worked in some of my cases.  Next time try to be a little more polite. I just put that in because it had worked for me in the past. I saw it above but he said he needed to add a lot of email addresses so I added to the answer from above. I could care less about the points I have enough to go around. I only try to help.  
0
 

Expert Comment

by:Stevex2
ID: 2525684
Sorry about above just took it the wrong way.
0
 
LVL 10

Expert Comment

by:RONSLOW
ID: 2544899
Stevex2's answer is not the same as previous.

He supplied a way to send to multiple recipients and to include the subject and body in the command.

I think you own him an apology, jhance :-)

0

Featured Post

Get proactive database performance tuning online

At Percona’s web store you can order full Percona Database Performance Audit in minutes. Find out the health of your database, and how to improve it. Pay online with a credit card. Improve your database performance now!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
Suggested Courses

622 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question