Send mail using MAPI and not get a prompt

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top