|
When I try to build/compile the code I get the following error:
LINK : fatal error LNK1104: cannot open file "mfc42ud.lib"
I have that file on my computer along with all the other happy little mfc libs, any ideas on what the problem might be?
|
|
|
|
|
You are trying to build the Unicode Debug configuration and do not have the necessary libs installed (can be done thro a custom setup of VC). If you are not interested in Unicode, then just build the "Win32 Debug" or "Win32 Release" configuration (using the Build toolbar).
|
|
|
|
|
For the source codes compared for Unicode, you will need this lib file and some other lib files. If you fully install Visual Studio, there should be 33 files under MFC\Lib folder. If you install it by typical option, some file(including mfc42ud.lib) won't be installed in your machine. Therefore, I suggest you re-install Visual Studio or copy these files from other machines.
Liu Xilin
Senior Software Engineer
|
|
|
|
|
Hi,
I have written a application which sends mail.It works
fine.Now i want the user to enter the recepient mail id.
If i set lpszName="";
then
m_lpfnMAPISendMail(MAPISession, 0, &msg, MAPI_DIALOG , 0);
function returns 25.
Here is my receipent struct:
recip.ulReserved = 0;
recip.ulRecipClass = MAPI_TO;
recip.lpszName = "";
recip.lpszAddress = NULL;
recip.ulEIDSize = 0;
recip.lpEntryID = NULL;
// Message Structure
msg.ulReserved = 0;
msg.lpszSubject = subject;
msg.lpszNoteText = note;
msg.lpszMessageType = NULL;
msg.lpszDateReceived = NULL;
msg.lpszConversationID = NULL;
msg.flFlags = 0;
msg.lpOriginator = NULL;
msg.nRecipCount = 1;
msg.lpRecips = &recip;
Is there anyway to specify the
recepient mail id at run time?
Thanks
|
|
|
|
|
I don't see why you need to do all this when my class looks after all this for you. Just add your recipients to the CMapiMessage member variables such as m_To.
|
|
|
|
|
Thanks for the reply..
I got my problem fixed.
|
|
|
|
|
Do you have any idea how can I ask the server to send a delivery receipt in a similar way like setting the read_receipt flag in the message structure of the mapi session? is there a flag for delivery receipt also?
Thanx
Enis Arif
-----------
"I am enough of an artist to draw freely upon my imagination. Imagination is more important than knowledge. Knowledge is limited. Imagination encircles the world." (Albert Einstein)
|
|
|
|
|
Not at least with Simple MAPI which this class wraps. There may be an extended MAPI property which you can use if you want to do this. I'd suggest you check the MSDN documentation on this.
|
|
|
|
|
it works really good for sending an email in an automatic mode
|
|
|
|
|
Hi all,
Is there any concern about domain of the MS Exchange server when using the CMAPI program ? I find that the works on a PC when I use domain account to login it which the PC is belonged to the same domain of the MS Exchange server. However, when I use local account to login the PC and use the program to send E-Mail, the program doesn't work. It works again only when I set the FLAGS parameter of MAPILogon to MAPI_LOGON_UI and a dialog box to capture the usename, password and domain information. I would like send E-Mail through a batch job without any user interaction. Can anyone tell me how to solve ? Many Thanks.
|
|
|
|
|
Issues about using MAPI in a service (unattended) are covered in a KB article which I'd suggest you checkout. I forget the number of the top of my head.
|
|
|
|
|
When I try to use the program to send email through Exchange Server, I can successfully send email when the parameter (Flags) of MAPILogon is set to MAPI_LOGON_UI (It ask me to input username, domain and password for mail server).
Can I use the program to send email without using the UI? How can I logon using username, domain and password without the UI?
Thanks,
|
|
|
|
|
Yes, just set up a MAPI profile in the control panel
|
|
|
|
|
Haw I can send mail using Simple Mapi from a services.
|
|
|
|
|
There is a KB article about doing this. Basically you will need to make sure to use a service provider which can work correctly in a service. You would be best advised to not use simple MAPI in a service and instead use something like SMTP or Extended MAPI
|
|
|
|
|
What will be the behaviour of MAPI if I have 2 accounts configured in my Outlook?
I have two accounts in my outlook.I am passing user name and password for one of my account but MAPI is sending the mail using my default account set in Outlook.
Tushar
|
|
|
|
|
I have been searching for answers for that problem for a while. If you ever figure out how to do a send as.. or how to make it Not use the default account please let me know. jwycpalek@concordinsur.com
|
|
|
|
|
What would be the behaviour if I have both "Microsoft Outlook" and "Outlook Express" installed on my computer. Through my application (which uses cmapi ) I want to use Profile on "Outlook Express" to send e-mail with no pop-up windows. And in browser my application is selected as default mail client. So when I click over any e-mail address (mailto:foo@foo.net) in browser, my application pops-up. And from my application I want to send e-mail using my Profile of Outlook Express, which I keep open while trying to use this. But my application crashes. When OE is set as default mail client and I run my application and send the e-mail from application through OE, it works. But the issue is I don't want OE to be set as default mail client.
Would appreciate any help or pointers to the right direction.
Thanks
zy
|
|
|
|
|
I want to know whether
LogOn method of MAPI Activex needs my outlook profile name and password for .pst file or my mail account and acoount password??
Tushar
|
|
|
|
|
Hi,
I use your class, and it works fine.
But (Always a 'But'), I am owner of multiples mailboxes, and I need to specify the field FROM.
I have tried, but I'm not regular with MAPI development .
I Hope that you can help me.
Thanks in advance.
Fdr
|
|
|
|
|
I'm feel stupid, very stupod.
Just Login with the good profile, and it works...
Sorry.....
Stupid Fdr
|
|
|
|
|
Perhaps it's a bit bold to call something that uses MAPI A MAPI Implementation?
You wouldn't call any program using the Win32 API "A Win32 API implementation", would you?
/Mike
|
|
|
|
|
I was never too good at languages, hopefully you will find the code better than my command of the english language
|
|
|
|
|
I make a MAPI(simple) application. but my application operate differently between the MS Outlook and MS Outlook express. If my window system's default mail client set outlook, MAPI does well operation. But when my defalut mail client is MS Outlook, my application don't operation. what is different MS Outlook and MS Outlook express. i can't understand. please... some give me solution.
void CCryptaManagerMailAttachDlg::OnCryptamanagerMailattachSendmail()
{
// TODO: Add your control notification handler code here
UpdateData(TRUE);
HINSTANCE hInstance = ::LoadLibraryA(_T("MAPI32.DLL"));
if (!hInstance) return;
ULONG (PASCAL *lpfnSendMail)(ULONG, ULONG, MapiMessage*, FLAGS, ULONG);
(FARPROC&)lpfnSendMail = GetProcAddress(hInstance, "MAPISendMail");
if (!lpfnSendMail)
{
FreeLibrary(hInstance);
return;
}
TCHAR szTempName[_MAX_PATH];
BOOL bRemoveTemp = FALSE;
MapiFileDesc filedesc;
memset(&filedesc, 0, sizeof(filedesc));
lstrcpyn(szTempName, m_strAddAttachFileName, _countof(szTempName));
#ifdef _UNICODE
char szTempNameA[_MAX_PATH];
_wcstombsz(szTempNameA, szTempName, _countof(szTempNameA));
#endif
TCHAR szTitle[_MAX_PATH];
lstrcpyn(szTitle, m_strAddAttachFileName, _countof(szTitle));
#ifdef _UNICODE
char szTitleA[_MAX_PATH];
_wcstombsz(szTitleA, szTitle, _countof(szTitleA));
#endif
filedesc.flFlags = MAPI_OLE_STATIC;
filedesc.nPosition = (ULONG)-1;
#ifdef _UNICODE
filedesc.lpszPathName = szTempNameA;
filedesc.lpszFileName = szTitleA;
#else
filedesc.lpszPathName = szTempName;
filedesc.lpszFileName = szTitle;
#endif
////////////////////////E-mail Address ///////////////////////
MapiRecipDesc recipdesc;
memset(&recipdesc, 0, sizeof(recipdesc));
recipdesc.ulReserved = 0;
recipdesc.ulRecipClass = MAPI_TO;
// recipdesc.lpszName = "";
recipdesc.lpszAddress = (LPSTR) (LPCTSTR)m_strEMail;
recipdesc.lpszAddress = "SMTP:daegull70@hotmail.com";
MapiMessage message;
memset(&message, 0, sizeof(message));
message.lpRecips = &recipdesc;
message.nRecipCount = 1 ;
message.lpszSubject = (LPSTR) (LPCTSTR) m_strMailTitle;
message.lpszNoteText = (LPSTR) (LPCTSTR) m_strMailText;
int nError = lpfnSendMail(0, NULL, &message, MAPI_LOGON_UI|MAPI_DIALOG, 0);
// occur error, error number is 2 -> MAPI_E_FAILURE
if (nError != SUCCESS_SUCCESS && nError != MAPI_USER_ABORT && nError != MAPI_E_LOGIN_FAILURE)
{
AfxMessageBox(AFX_IDP_FAILED_MAPI_SEND);
return;
}
FreeLibrary(hInstance);
return;
}
|
|
|
|
|
Mine doesn't work with Microsoft outLook,but works with Outlook Express.server rejects the email address.
Thanks,
Archana
|
|
|
|