Solved

Sending e-mails from my application.

Posted on 2000-02-14
14
222 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
In this post we will learn different types of Android Layout and some basics of an Android App.
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.
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses

734 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