Click here to Skip to main content
15,908,013 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionHow can i Find the type of Internet Connection... Pin
swarnamanoo11-Apr-04 20:53
swarnamanoo11-Apr-04 20:53 
Questionhow does a program delete itself? Pin
includeh1011-Apr-04 20:50
includeh1011-Apr-04 20:50 
AnswerRe: how does a program delete itself? Pin
John R. Shaw11-Apr-04 22:40
John R. Shaw11-Apr-04 22:40 
AnswerRe: how does a program delete itself? Pin
David Crow12-Apr-04 4:18
David Crow12-Apr-04 4:18 
GeneralRe: how does a program delete itself? Pin
includeh1012-Apr-04 6:57
includeh1012-Apr-04 6:57 
QuestionHow to place the new mail in outbox of outlook programatically Pin
Rajesh match11-Apr-04 20:28
Rajesh match11-Apr-04 20:28 
AnswerRe: How to place the new mail in outbox of outlook programatically Pin
David Crow12-Apr-04 4:19
David Crow12-Apr-04 4:19 
GeneralRe: How to place the new mail in outbox of outlook programatically Pin
Rajesh match12-Apr-04 4:29
Rajesh match12-Apr-04 4:29 
hello david
this is my code for saving mail in outbox
this is automation code
its notworking but when i make call to send it send mail directly
but i only need to place in outbox folder

_Application pApp;
COleException e;

if(!pApp.CreateDispatch("Outlook.Application", &e)) {
CString str;
str.Format("CreateDispatch() failed w/error 0x%08lx", e.m_sc);
AfxMessageBox(str, MB_SETFOREGROUND);
return;
}

COleVariant covOptional((long)DISP_E_PARAMNOTFOUND, VT_ERROR);
_NameSpace pNameSpace;
MAPIFolder pOutbox;
_Items pOutboxItems;
Attachments pAttachments;
Recipients pRecipients;
Recipient pRecipient;

// Create NameSpace pointer.
pNameSpace = pApp.GetNamespace("MAPI");


pNameSpace.Logon(covOptional, covOptional, covOptional, covOptional);

// Prepare a new mail message
_MailItem pNewMail(pApp.CreateItem(0));

pOutbox = pNameSpace.GetDefaultFolder(4);//getoutbox folder
pOutboxItems = pOutbox.GetItems();


pNewMail=pOutboxItems.Add(covOptional);//put the message in out boxx


pNewMail.SetTo("global_com2000@yahoo.com");
pNewMail.SetSubject("Test...");
pNewMail.SetBody("Hi Mapi\n\n");
pRecipients.Add("global_com2000@yahoo.com");

// Resolve the recipient address.
pRecipients .ResolveAll();



pNameSpace.Logoff();


GeneralRe: How to place the new mail in outbox of outlook programatically Pin
David Crow12-Apr-04 5:13
David Crow12-Apr-04 5:13 
Questionwhy to initialize like this ? Pin
vividtang11-Apr-04 20:08
vividtang11-Apr-04 20:08 
AnswerRe: why to initialize like this ? Pin
Maxwell Chen11-Apr-04 20:28
Maxwell Chen11-Apr-04 20:28 
AnswerRe: why to initialize like this ? Pin
toxcct11-Apr-04 22:34
toxcct11-Apr-04 22:34 
GeneralRe: why to initialize like this ? Pin
John R. Shaw11-Apr-04 23:00
John R. Shaw11-Apr-04 23:00 
GeneralRe: why to initialize like this ? Pin
toxcct12-Apr-04 3:38
toxcct12-Apr-04 3:38 
GeneralRe: why to initialize like this ? Pin
John R. Shaw12-Apr-04 11:45
John R. Shaw12-Apr-04 11:45 
GeneralRe: why to initialize like this ? Pin
toxcct12-Apr-04 21:29
toxcct12-Apr-04 21:29 
AnswerRe: why to initialize like this ? Pin
vividtang12-Apr-04 2:08
vividtang12-Apr-04 2:08 
GeneralRe: why to initialize like this ? Pin
Paul Ranson13-Apr-04 1:47
Paul Ranson13-Apr-04 1:47 
GeneralWindows Msg Pin
Shenthil11-Apr-04 19:32
Shenthil11-Apr-04 19:32 
GeneralRe: Windows Msg Pin
Prakash Nadar11-Apr-04 22:17
Prakash Nadar11-Apr-04 22:17 
GeneralRe: Windows Msg Pin
SiddharthAtw11-Apr-04 23:34
SiddharthAtw11-Apr-04 23:34 
Generalabout IPC plant Pin
Member 101286911-Apr-04 19:08
Member 101286911-Apr-04 19:08 
QuestionWhat Code Browser & Source Control To Use? Pin
bitpusher11-Apr-04 18:53
bitpusher11-Apr-04 18:53 
AnswerRe: What Code Browser & Source Control To Use? Pin
The Bowman12-Apr-04 7:10
The Bowman12-Apr-04 7:10 
Generalfail to declare IHTMLDocument2 Pin
yanuart11-Apr-04 17:23
yanuart11-Apr-04 17:23 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.