Originally posted by: Edwin van Stam
Hi,
I'm looking for some code with which I can retrieve the mail ID of an NT user.
So, the only thing I know is in an environment variable then NT username, as defined in user manager for domains. Based on this username, i want to create an executable or .dll, that has 1 parameter, and sets another environment variable (such as PATH, or INCLUDE, i now want to set the environment var EXCH_MAILID) to the according X400 or SMTP mail ID, as entered in the Exchange definitions on the current domain.
Anyone some idea's or sample code that could point me to the right direction?
I'd be grateful!
Edwin van Stam
Originally posted by: Naoyuki Yoden
After repeated attempts to avoid this problem
// these are globally defined
void MailProgram()
g_cmail.To("UltraMaroon@email.msn.com");
g_cmail.From("user@somewhere.com");
g_cmail.Subject("Test Email");
g_cmail.Text(g_textbuf);
g_cmail.Send();
}
I used the MAPI class to send out multiple mails
to multiple users. In the program below,
TextProgram() runs on a thread created by a main
dialog. But after consecutive calls(20to30) to
TextProgram(), g_cmail.Send() failed to return,
keeping with it a big chunk of memory and several
threads.
(but they all failed), I am beginning to blame the
network. Is there any way to obtain some kind of
notification from the MAPI library that it's ok to
proceed to the next "Send"?
CIMapi g_cmail;
char g_textbuf[LARGESIZE];
void TextProgram()
{
while ( 1 )
{
WaitForSingleObject( notification from main dialog );
if ( condition matches )
brak;
if ( ! PrepareMessageText(g_textbuf,LARGESIZE) )
break;
MailProgram();
}
endthreadex();
}
{
Originally posted by: Teik
#include <mapi.h>
void CBugReport::OnOK() {
CDialog::OnOK(); // crashes if this is removed.
1] The code above works correctly. Email was sent.
2] However, if I removed CDialog::OnOK(), the email will
Any help will be greatly appreciated. Thank you very much.
Teik
I compiled your sample code and it worked like a charm.
However, I have one problem that I would like to ask.
Please refer to the source code below:
#include "imapi.h"
CIMapi mail;
mail.To("someone@somewhere.com");
mail.From("me@here.com");
mail.Subject("Test Email");
mail.Attach("somefilename");
mail.Text("Body text for this email");
mail.Send();
}
also be sent but the application crashes. Is there a
requirement to close the dialog application after using
this simple MAPI?
Originally posted by: Rahul Raje
Please can U fix this problem ?
It's really challenging
I just cant figure out how to do it
Originally posted by: Rahul Raje
Please can U fix this problem ?
It's really challenging
I just cant figure out how to do it
Originally posted by: Mahesh Kumar
I have tried to send e-mail using your source code,
still i am not able to send emails through my application,
the error code returned by the m_lpfnSendMail(MAPISendMail)
is 3. I have microsoft outlook in my system.
Is there any other suggestion?
Please send me.
Originally posted by: CODO
:-)))
GREAT
:-)))
Originally posted by: Renee
I down loaded the code and had a few problems with it,
so I downloaded the Platform SDK from Microsoft and compiled the examples on there. They seem to work okay, but I noticed that it pops up windows when dialing out to the internet. Have you found a way to eliminate the windows part of this example?
Originally posted by: hjkim
I changed default MAPI to Netscape Messenger.
when I used Outlook express.. my program worked very well.
but if i changed defalt MAPI.. it's not work very well.
Other methods that IMAPI class has are work.
but if I used Attach() method.. program can't send mail.
If I deleted Attach() method.. program can send mail very well.
How can I use Attach() method for Netscap Messenger?
ReplyOriginally posted by: Prasad
This class works very well with Microsoft Outlook, but I have Lotus Notes also on my system, if I change to Lotus Notes as my default mail client, I can see mail.send() getting executed without any error codes but I don't receive any mails, I believe it is not working with Lotus Notes, Can someone please help me out in this scenario how to proceed....
Reply