Send mail using MAPI and not get a prompt

  • Thread starter Thread starter Sanjay_S
  • Start date Start date
S

Sanjay_S

I am writting an application in VC++ 6,

How do I send mail using MAPI and not have the user get a prompt.
I'm trying to do some automation, and I want my program to notify the user
through email (MAPI) when the program is done.
However, when I try to use MAPI, a prompt is displayed saying "A program is
trying to automatically send e-mail on your behalf."
This prompt waits for the user to click Yes or No, before sending the email.

Please let me know to send mail without user intervension.

_MailItemPtr olMail( pApp->CreateItem(olMailItem));
olMail->PutTo("(e-mail address removed));
olMail->PutSubject("New Mail Arrived");
olMail->PutBody("You have a meeting");
olMail->Send();


Thanks in advance

Sanjay
 
Back
Top