To use BCC (Blind carbon copy),
Add to the IMapi.h file:
BOOL BCc(LPCTSTR recip);
Add to the IMapi.cpp file:
BOOL CIMapi::BCc(LPCTSTR recip)
{
if (AllocNewTo())
{
// We succeeded in allocating a new recipient record
m_message.lpRecips[m_message.nRecipCount].lpszName = (LPTSTR) malloc(strlen(recip) + 1);
strcpy(m_message.lpRecips[m_message.nRecipCount].lpszName, recip);
m_message.lpRecips[m_message.nRecipCount].ulRecipClass = MAPI_BCC;
m_message.nRecipCount++;
return TRUE;
}
m_error = IMAPI_FAILCC;
return FALSE;
}
To add a BCC recipent use: mail.BCC("someone@ihug.co.nz");
Note: while testing if you BCC yourself twice you only recieve one message!
Jat send
ReplyOriginally posted by: John
Hi,
how can i send multiple mails within one method?
after the first mail.send() call the program crashes(Debug Assertion failed).
I basically created a loop which executes the following sequence:
CIMapi mail;
mail.To(...); //always the same recipient
while (condition)
{
mail.Subject(...);
mail.Attach(...)
mail.Send();
}
Originally posted by: Sara Griffin
What is Mapi? When I go to email my resume from Quick and Easy Resume it brings up that I do not MAPI to email?
Thank You
ReplyOriginally posted by: Roland
Hello
I found another problem with the outlook security dialog (another application try to send ...) while sending a mail. The security dialog has three buttons. Yes, No and help. If I press the help button my application crashes with stack overflow failure in the clbcatq.dll ???
Has anyone information or fixes for this problem ?
Originally posted by: Hadi Rezaee
Hi,
First, i want to thanks you for this nice mapi engine :)
But i had a question in my mind, how can i get the sent mails ?
For instance, i add 350 mail addres as recieption.
And then i send a mail to all of them, how can i get the counter ?
Best Regards,
Hadi
Originally posted by: robert
How can I use the Files (Especially Send Function )
in FormView ,not based on Dialog
Originally posted by: Srinivas
I am trying to develop a COM add-ins using VB to avoid this dialog box.Please send me necessary code.
Thanks In advance.
while sending an automatic Email from the application I get an Dialog box which says
"some program is trying to send an E-Mail on behalf of you"
how to avoid this security through application?
Originally posted by: Niels Sejersen
They come when doing:
The nError is 0: SUCCESS_SUCCESS, and the mail is also received correctly at the reciepient.
Here is what I do:
I am using VC++ 6, Outlook 97, on an NT4 machine.
Any help is appriciated
Hi,
This was just what I was looking for. Unfortunately I get two:
First-chance exception in TestProgram.exe (KERNEL32.DLL): 0x000006BA: (no name).
int nError = m_lpfnSendMail(0, (ULONG) pParentWnd->GetSafeHwnd(), &m_message, MAPI_LOGON_UI | flags, 0);
But still, I would like to get rid of the exceptions
CIMapi NewMail;
NewMail.To("hgm@somewhere.dk");
NewMail.Subject("Subject text");
NewMail.Text("Dette er mail teksten");
NewMail.From("nse@somewhere.dk");
NewMail.Send();
Niels
Jatt send
ReplyOriginally posted by: straycat
int nError = m_lpfnSendMail(0, (ULONG) pParentWnd->GetSafeHwnd(), &m_message, MAPI_DIALOG | MAPI_LOGON_UI | flags, 0);
I just added the flag MAPI_DILAOG and everithing works fine !!
I try to use this class to call my Netscape Messenger , but this don't work as should be . To fix this I change the following line :
Originally posted by: Fred Liu
BOOL CIMapi::Send(ULONG flags)
.......
if (nError != SUCCESS_SUCCESS && nError != MAPI_USER_ABORT && nError != MAPI_E_LOGIN_FAILURE)
return TRUE;
This code is very nice except this bug. Add this to fix it:
{
char szBuffer[255];
GetCurrentDirectory(MAX_PATH,szBuffer);
// Get the current working directory:
SetCurrentDirectory(szBuffer);
//Restore the current working directory
{
AfxMessageBox(AFX_IDP_FAILED_MAPI_SEND);
return FALSE;
}
}