Open default mail client programmatically

Hi all,
Is there a function in visual c++ to open default mail client
and pass to it destination addr, subject, body an an attachement (like
SendObject in VB).

Thanks.


0
m.b2 (3)
6/26/2005 8:57:04 AM
vc.mfc 33608 articles. 0 followers. Follow

3 Replies
238 Views

Similar Articles

[PageSpeed] 24

ShellExecute mailto:\\

-- 
- Mark Randall
http://zetech.swehli.com
"MB2" <m.b2@laposte.net> wrote in message 
news:d9lqfe$ors$1@apollon.grec.isp.9tel.net...
> Hi all,
> Is there a function in visual c++ to open default mail client
> and pass to it destination addr, subject, body an an attachement (like
> SendObject in VB).
>
> Thanks.
>
> 


0
markyr1 (230)
6/26/2005 10:17:15 AM
>Is there a function in visual c++ to open default mail client
>and pass to it destination addr, subject, body an an attachement (like
>SendObject in VB).

As Mark mentions ShellExecute will let you do the basics, but you can
achieve more control using the Simple MAPI APIs.

Dave
-- 
MVP VC++ FAQ: http://www.mvps.org/vcfaq
0
davidl7375 (2060)
6/26/2005 4:24:51 PM
you can use this code snippet

ShellExecute(NULL,"mailto:me@me.com?subject=helloo&body=hello this is
alok&attachments=c:\\alok.txt",NULL,NULL,SW_SHOWNORMAL);


--
cheers,
Alok Gupta
Visit me at http://alok.bizhat.com

"MB2" <m.b2@laposte.net> wrote in message
news:d9lqfe$ors$1@apollon.grec.isp.9tel.net...
> Hi all,
> Is there a function in visual c++ to open default mail client
> and pass to it destination addr, subject, body an an attachement (like
> SendObject in VB).
>
> Thanks.
>
>


0
thatsalok1 (226)
6/27/2005 4:48:03 AM
Reply:

Similar Artilces:

Going off line from the client
Hi I have sucessfully installed the MSCRM server and client on a 2000 domain. The client and server installation work well and all records can be seen from the client, all shortcuts work. Both installations returned a successfull installation message The problem is that when going offline from the client - the domain is all of the sudden not availible or could not be contacted. The SQL Icon on the client (MSDE) shows a "not connected" status, and attempting to start the services (from the service control manager) generates an access denied error. The MSCRM user account is part of...

Outlook will not stay open
Outlook 2000 will not stay open when I launch the app. It will open up, download messages, and then close. Any suggestions? Thanks ...

why wont an excel doc open with new msn office
i have just got a new comp with the new microsoft woeks on it, word doc if differant, and a few other things but an excel doc was sent to me an it will not open it ???????? Hi MS Works is a 'light' version of Office, containing a 'light' version of Excel and a 'light' version of Word. You cannot open Excel or Word files with Works. You'll have to get the files saved as .csv or .txt or a Works file to be able to open them with Works. Andy. "peterk4" <peterk4@discussions.microsoft.com> wrote in message news:53597904-F529-4E67-BC56-D957C375779...

WHY CAN'T I SEND MY E-MAILS? THEY WIND UP UNSENT IN OUTBOX.
Why can't I send my e-mails? The wind up unsent in outlook. Version? do they change when you look in the outbox? http://www.slipstick.com/problems/outbox.htm -- Diane Poremsky [MVP - Outlook] Author, Teach Yourself Outlook 2003 in 24 Hours Coauthor, OneNote 2003 for Windows (Visual QuickStart Guide) Author, Google and Other Search Engines (Visual QuickStart Guide) Outlook Tips: http://www.outlook-tips.net/ Outlook & Exchange Solutions Center: http://www.slipstick.com Join OneNote Tips mailing list: http://www.onenote-tips.net/ "PatA" <PatA@discussions.microsoft.com&g...

Mails
Hi I have 500 user in my organization and one of the user is facing a very strange problem like whenever he send mail to anyone on the from field we are getting the full AD path. Could anyone help me in resolving this issue he is very senior most person in our organisation. Help will be highly thankfull. Regards, ...

bullets always staying on the default
Hi, I created a custom powerpoint template (.potx) in office 2007. In the master slide and on the master slide i changed the identation of the levels and the bullets used. In the masterslide it's looks fine and also on the content slides underneath. However any presentation based on that template just doesn't seem to follow at flow. If i type in text and click on the ' bullets' icon it just places the default round bullet in front of the text with no indentation. The next level, which i get by clicking on the 'increase indent level' icon doesn't ...

automatic list of e-mail subjects
I would like to list the subject names of whole e-mails in my INBOX (including all subfolders of Inbox). How can i do that by code? I think that will be wonderfull, I'm looking for something like that since a year because i can't program anything... I will be even more powerfull if the list could be shared on a server and automatically load to every users. This will sell like cookie since a lot of company work with porject number and custumer, rules for filtering could also be manage on the server by only one person as the subject list also. "mezzanine1974" wrote: &...

Opening Word Attachment
Weird problem here...All office programs seem to function well just have some minor issues opening files. Example: In Outlook, trying to open a Word attachment, if I open the message and then try to open the attachment from there, it says "cannot find the file specified", but if I have word open already, then do the same exact thing, it opens. I have this problem also with Explorer. I can browse my hard drive and network and find anything, but cannot open it directly from Explorer. I have to open the application that I am using and then open the file through the Open Fi...

Can't open Cash Receipts Entry
Hi After I updated from GP 8 to GP 9 I can't open the Cash Receipts Entry form, the system comes with this message "Cannot access this form because the directory containing it is not loaded". Is there a way to fix this and if there is how ? Best regards Andreas Høyer The user do not have access to the window. Go to Advance Security and give them access to the Cash Receipts entry window. Gerald "Andreas Hoyer" wrote: > Hi > > After I updated from GP 8 to GP 9 I can't open the Cash Receipts Entry form, > the system comes with this messa...

[ANN] XMLmind FO Converter v4.0
XFC v4.0 has been released. This version is a major breakthrough as it brings support of Office Open XML (MS-Word 2007 native format) as alternate output format. As usual, Personal Edition is freely available from <http://www.xmlmind.com/foconverter/download.shtml>, and Professional Edition upgrade is available to eligible customers from <http://www.xmlmind.com/foconverter/upgrade.html>. Personal Edition users, please note that Personal Edition license terms have changed drastically compared with version 3.1. Except in a few special cases Personal Edition may no longer be used fo...

Programmatically "elevate" my app for a particular task.
Hi there! I developed a MFC/VC++ 6.0 program that has to run at startup. It monitors some Services which I also developed, giving the user information on how they are running, and letting him or her start/stop this Services. The problem is that to start/stop a service I have to invoke ::OpenService with SERVICE_START | SERVICE_QUERY_STATUS access: If I run the program as administrator (elevated), then this works; but if I run it the standard way, then the function returns "access denied". I wouldn't mind to check the app so that it would always run as administrator; but th...

OUTGOING MASS MAILINGS
We have Outlook 2003 with Windows XP (all running with all the latest patches). We use Act! version 6.0 to generate mailing lists which we use to send out monthly newsletters. Act builds the messages and sends them to Outlook's 'Drafts" folder. Oulook then proceeds to send out the emails. We send out groups of 100 emails at a time (since Act can't handle more than 120 mass emails in this manner) until we have generated emails for all of our 1200 contacts. We always wait for all the messages to be sent out so the Outbox folder is empty when we start generating ...

E-mail Marketing Newsletters
I am attempting to create an html newsletter for e-mailing to my current clients. I have spent numerous hours trying to create a professional looking newsletter in html format with links to various information on the web using Publisher 2003. I have been experienceing the flaws of html format newsletters with text and graphics reacting in different ways per the program used to open and view them. Is an html format newsletter the best way to achieve a dynamic newsletter my clients can use as a resource to locate items on the web via links or should I be going down a totally different pa...

Signature option disappears when using word as e-mail editor
Hello, I've got a weird problem. When I try to use word as my e-mail editor, I lose the ability to add signature. As soon as I check the box to use word as my e-mail editor, the signatures buttons are greyed out. Any advice? Thanks! Jeff Jeff Brooks-Manas wrote: > Hello, > > I've got a weird problem. When I try to use word as my e-mail editor, > I lose the ability to add signature. As soon as I check the box to > use word as my e-mail editor, the signatures buttons are greyed out. > > Any advice? > > Thanks! > > Jeff The signature option within ...

Sending mail for different domains through different IP's
I have searched with Google and looked through newgroups but have not found the answer to my following question. I have seen similar questions, but none that describe my exact situation, although it must be quite common. Assumptions: - I have 2 internet-domains, let's call them ABC.com and 123.com - I have 2 NT login domain accounts. One with e-mail aliasses for domain ABC.com and one for domain 123.com - I also have 5 IP addresses configured on the network-card from the server, let's call them IP1 through IP5. All addresses are sequential on the same subnet - I want outgoing message...

how can make a mail copy to a group
i using win 2003 , exchange 2003 if have a user mail need forward ( make a copy ) to many users how can i do this ? i just know how to make a copy to one copy thx On Sat, 12 Mar 2005 01:03:12 +0800, "tequila" <tequila529@gmail.com> wrote: >i using win 2003 , exchange 2003 >if have a user mail need forward ( make a copy ) to many users >how can i do this ? > >i just know how to make a copy to one copy >thx > > Have you looked at creating a Dirstribution Group within Active Directory Users & Computers? You can mail enable it and make a number of...

Serucity Patch and Outlook 2000 Mail Merge
We use Outlook with an Exchange server. Outlook 2000 with latest update and Exchange 5.5SP4 plus updates. We have a contact folder and started a mail merge from Outlook. It works great and we're able to use, add, test, and confirm the fields and formats that we like. We are using it to merge into an email message. Everything works fine. One item we'd like to get around when sending the merge to Outlook it prompts twice at every contact - once asking if we want to allow access to Outlook and to this prompt we can respond allow access for x minutes. This prompt is ok because when mergi...

Automatically open different workbooks depending on user account used.
There are two userrs on the same computer. When user 1 opens Excel, I'd like oen workbook to automatically open. When user2 opens Excel, I'd like a diffferent workbook to automatically open. Is this possible? (Each user logs into Windows usning their uuser account.) The computer is running windows XP pro and Excel 2007. Thanks, Something like this might work for you. This is untested. Post back if this doesn't work for you. Place the following macro in the ThisWorkbook module. You would need to change ThePath to your real path, the user account names for Joe and Bill...

Information Store cannot be opened.
Hi I have a problem with a NT Server. This server is on a VPN DLS setup connected to our office. They have Outlook 2000 installed but when they try to access the mailbox it gives them a message saying: Unable to expand the folder. The set of folders could not be opened. The Information store could not be opened. They are able to ping the exchange server by name and also do a Check Name in the mail Properties. Has anyone seen this before. ...

Can I open an imbedded word doc from a cmd button?
I would like to imbed a word doc in my db (in a form?) and open it with a cmd button (like a help document). Is this possible and if it is how is this done? Many thanks, Joe M. On Wed, 18 Nov 2009 08:24:10 -0800, Joe M. wrote: > I would like to imbed a word doc in my db (in a form?) and open it with a cmd > button (like a help document). Is this possible and if it is how is this done? > > Many thanks, > Joe M. Why do you need to embed a document in your database? Store the document in a folder on your hard drive. Then open it from a command button whenever ...

Rule to delete junk mail does not always work
I have created a rule to delete any mail which contain certain characters or words. This appears to work sometimes but some of the mail containing these words still gets through (usually finish up in the Junk mail folder). When I run the rule on the Junk Mail folder these emails get deleted! So the rule would seem to be ok. Any idea why the rule does not always work? Al PE <pitsofearth@msn.com> wrote: > I have created a rule to delete any mail which contain certain > characters or words. This appears to work sometimes but some of the > mail containing these words ...

Outlook 2007 doesnt receive all mail
Just loaded Outlook 2007 onto my Vista laptop. After some juggleing I have managed to set up two POP mail based email addresses under one profile. So to test the system I have been sending messages to and from a hotmail live account I have. If I send to both addresses, only one arrives in the inbox. I fI sedn seperate messages to it - only the one to the other account comes through???? So each account will receive some messages indicating the set up is right but not on every occasion. Anyone got any suggestions for this? Have you also installed Microsoft Outlook Connector? If n...

IE shouldn't open new windows on every link clicked.
Whenever I click a link in Outlook, IE causes a new window to open every single time. This happens even if the link is to the same website. For example, I click a link to an item listed on Ebay. A new window is opened. Then I may click on another link to Ebay for an item, even in the same email, and another window opens. Before when I was using Outlook Express, a new window did not open when I clicked additional links in the same piece of email. It simply used the same window to move me to another item on the same website. Is there a way to prevent all these extra windows from op...

Outlook 2003 not responding when clicking on an e-mail with attachment
Hi, I am running Outlook 2003 on Microsoft XP. After reading various posts on this same problem, I figured the problem had to do with Winfax. I have Winfax 10.02 which is the updated version for Microsoft XP. The posts hint that the problem has to do with winfax but nobody posted a solution. I need both these programs on the computer. Any help would be highly appreciated. Thanks in advance - nb. See if this information helps. http://www.slipstick.com/outlook/esecup/getexe.htm "nuj baf" <nujbaf@yahoo.com> wrote in message news:d38d1b37.0404081330.17195721@posting.googl...

Public folders not showing on all Outlook clients
Hi I have Exchange Server 2003 on SBS 2003. Every Outlook user has his own Public folders created and has given permission for other users to read the public folders. The problem is the other users do not see these public folders that have been shared. I have even added permissions on Exchange System Manager in Public folders but still they cannot see one anothers Public folders! Please help! Chris <chris.l@actionprgroup.com> wrote: >I have Exchange Server 2003 on SBS 2003. Every Outlook user has his own >Public folders created and has given permission for other users t...