 |
|
 |
Hi everyone,
I have implemented sending e-mail automatically through my application. For that i m using the "MAPISendMail()" function which is defined in MAPI32.dll. I m passing all of it's arguments correctly. And mail is even received at recipient. But my problem is that when i m passing message text ( second argument) as unicode (in 2 bytes for each char. one for characted and one for language) string, e-mail is received at recipient end but displays nothing. Why So ? if i m sending in non-unicode data it is ok. I have even tried to send message string in 4 bytes format too(2 bytes for character and 2 bytes for language,usually used by LINUX).
Please help me if anyone can...?
if more info required... feel free to ask...
regards,
Rakesh Pahwa
|
|
|
|
 |
|
 |
If I try and send a message using Outlook 2003 I immediately receive an "Undeliverable:" message in my inbox. This seems to be caused because the E-mail Type (Properties of the address) is the address in capital letters. Shouldn't this be SMTP? If I prefix the address with SMTP: Everything works, but the SMTP: also appears in the address field of Outlook. How can I prevent this showing?
Another small point:
In the demo program, if I check both "Resolve" and "Interactive" the program asserts.
|
|
|
|
 |
|
 |
Profile have no password. Profile service - mail account have password. Logon don't work with password - always use SharedLogon. Profile without password works, but no messages found.
|
|
|
|
 |
|
 |
To run cmapi.exe and do not close the mail client(outlook), run cmapi.exe again, this time, a warning dialog will popup with 'A dialog is open, Close it and try again' in it.
But if we call mail client by inputing 'mailto:...' in start->Run..., It will be no this issue.
How to avoid this issue ?
Thanks
|
|
|
|
 |
|
 |
i need a mail sending program in vc++ for my project now iam using outlook express connected to vc++ and now mail is sending through this procedure i want my project should not be depand on any other s/w or tool so pls send some example code to send mail using SMTP or MAPI
Hope some one will help me
Renuchandran
|
|
|
|
 |
|
|
 |
|
 |
I can not run it and get many error message. Sorry I forget to say that I am a newbei of C++. Very likely, this question is too simple.
the sample error is :
D:\emailApp\testemail\CMapi.cpp(446) : error C2065: 'ULONG_PTR' : undeclared identifier
D:\emailApp\testemail\CMapi.cpp(446) : error C2146: syntax error : missing ';' before identifier 'nUIParam'
D:\emailApp\testemail\CMapi.cpp(446) : error C2065: 'nUIParam' : undeclared identifier
D:\emailApp\testemail\CMapi.cpp(452) : error C2146: syntax error : missing ';' before identifier 'pParentWnd'
D:\emailApp\testemail\CMapi.cpp(460) : error C2146: syntax error : missing ';' before identifier 'AfxGetMainWnd'
D:\emailApp\testemail\CMapi.cpp(792) : error C2146: syntax error : missing ';' before identifier 'uiParam'
D:\emailApp\testemail\CMapi.cpp(792) : error C2065: 'uiParam' : undeclared identifier
D:\emailApp\testemail\CMapi.cpp(799) : error C2146: syntax error : missing ';' before identifier 'pParentWnd'
D:\emailApp\testemail\CMapi.cpp(800) : error C2181: illegal else without matching if
D:\emailApp\testemail\CMapi.cpp(803) : error C2146: syntax error : missing ';' before identifier 'AfxGetMainWnd'
D:\emailApp\testemail\CMapi.cpp(839) : error C2146: syntax error : missing ';' before identifier 'uiParam'
D:\emailApp\testemail\CMapi.cpp(843) : error C2146: syntax error : missing ';' before identifier 'pParentWnd'
D:\emailApp\testemail\CMapi.cpp(844) : error C2181: illegal else without matching if
D:\emailApp\testemail\CMapi.cpp(847) : error C2146: syntax error : missing ';' before identifier 'AfxGetMainWnd'
D:\emailApp\testemail\CMapi.cpp(881) : error C2146: syntax error : missing ';' before identifier 'uiParam'
D:\emailApp\testemail\CMapi.cpp(885) : error C2146: syntax error : missing ';' before identifier 'pParentWnd'
D:\emailApp\testemail\CMapi.cpp(886) : error C2181: illegal else without matching if
D:\emailApp\testemail\CMapi.cpp(889) : error C2146: syntax error : missing ';' before identifier 'AfxGetMainWnd'
D:\emailApp\testemail\CMapi.cpp(973) : error C2146: syntax error : missing ';' before identifier 'uiParam'
D:\emailApp\testemail\CMapi.cpp(977) : error C2146: syntax error : missing ';' before identifier 'pParentWnd'
D:\emailApp\testemail\CMapi.cpp(978) : error C2181: illegal else without matching if
D:\emailApp\testemail\CMapi.cpp(981) : error C2146: syntax error : missing ';' before identifier 'AfxGetMainWnd'
Error executing cl.exe.
testemail.exe - 22 error(s), 0 warning(s)
__________________________________________________________________________
I think it may be caused by ULONG_PTR. i wonder whether or not I missed some library or missed some step before I run this program.
I will appreciate your answer of course. Thanks.
|
|
|
|
 |
|
 |
If you are using VC6, you need sp6 to solve this problem.
Hope this will help.
Cheers,
Ke
|
|
|
|
 |
|
 |
MAPIEx – Sending e-mail as…
Environment – Windows XP, .NET 2003 (C++), MS-Office / Outlook 2003 / Exchane installed
I am trying to implement an automated email – send message from a user application, without it being identifying the actual user, but sending it as if it was sent from say a “Generic” name – like “Help Desk” etc…
It all seems to work fine, the hRes is S_OK, BUT the recipient of the message can still see the actual name of the person sending the message, subsequently – instead of just calling the “Help Desk” they try to call that specific person and insist to talk to them…
What am I doing wrong here? I suspect the Exchange server is taking the current “Profile” user logged in, and does NOT allow my application to override it.. Is there a way around this?
Hope someone can help me
Thanks
Alex Evans
SPropValue prop;
prop.ulPropTag = PR_SENDER_NAME;
prop.Value.LPSZ = _T(“Help Desk”);
hRes = m_pMessage->SetProps(1,&prop,NULL);
Interestingly enough… The following code DOES work (that is – the actual Sender’s email address is used in the message)
SPropValue propEmail = {0};
propEmail.ulPropTag = PR_SENDER_EMAIL_ADDRESS;
propEmail.Value.LPSZ = (LPSTR)(LPCTSTR)m_csFromAddress;
m_pMessage->SetProps(1,&propEmail,NULL);
|
|
|
|
 |
|
 |
There appears to be a USER & GDI object resource leak in CMapiSession. This code demonstrates the problem:
CMapiSession session;
if (session.MapiInstalled())
for (int i=0; i<100; i++)
{
CMapiMessage message;
if (session.Logon("Dean"))
;
Sleep(5000);
if (session.Logoff())
;
}
I am running XP pro. The USER & GDI resources increase every 5 seconds (in Task Manager) for each log on/off. A workaround is to make session a global and call Logon only once for the life of the app.
|
|
|
|
 |
|
 |
Is it possible to control the size/position of the outlook-dialog shown while using MAPI_DIALOG during MAPISend?
|
|
|
|
 |
|
|
 |
|
 |
sometimes a big message is breaked apart into small pieces due to server limitation of maximum size of message. how can i merge it back after downloading? any idea?
|
|
|
|
 |
|
 |
Is it possible, using simple MAPI, to determine if a session is already running? I've got a screen saver that gives the user notification when a new message arives. I only want to do this if their email client is already running, rather than having my screen saver popping up MAPI dialogs.
So I'd like to be able to query MAPI for an existing session and only logon if one is already running.
Thanks,
don
|
|
|
|
 |
|
 |
Call the SharedLogon method to achieve this.
|
|
|
|
 |
|
 |
Hello,
I got a big problem. I want to send an email using the MapiSendMail.
The mail's body is an text/html, and there is a picture.
When I send the email only the html text is send.
Please help me! Thank you!
|
|
|
|
 |
|
 |
Hello,
I got a big problem. I want to send an email using the MapiSendMail.
The mail's body is an text/html, and there is a picture.
When I send the email only the html text is send.
Please help me! Thank you!
|
|
|
|
 |
|
 |
No need to post the message twice!!.
Anyway, simple MAPI does not support sending MHTML email messages. For this you will need to use Extended MAPI which limits you to MS Outlook or otherwise send you are sending a MHTML message, use SMTP directly. For this you could use something like CDO for Windows 2000, my own CPJNSMTPConnection class or the many commercial products in this area.
|
|
|
|
 |
|
 |
Can the address book in Outlook XP be updated through MAPI calls?
|
|
|
|
 |
|
 |
Not thro Simple MAPI which is what this class encapsulates but probably thro extended MAPI or some specific Adresses books API's. I'm sure you could quikcly find this info if you use the MSDN.
|
|
|
|
 |
|
 |
Thanks for your help. I'll take a look in MSDN to see what I can find.
|
|
|
|
 |
|
 |
Hello, can I extend the MAPI to do calendaring, task and etc? Does Ms Exchange use MAPI to communicate with Ms Outlook.
thanks in advance.
Sonork 100.41263:Anthony_Yio
|
|
|
|
 |
|
 |
To achieve this you will need to look into using Extended MAPI. This class is only designed to encapsulate the Simple MAPI API.
|
|
|
|
 |
|
 |
Is there any way to suppress the "Sending Dialog" Outlook Express is giving me ? I read a lot of documentation in the last hours and as far as I know it's only possible with extended MAPI.
So it can not be done with your class ?
BTW : The link on your website to "extended Mapi" does not work.
|
|
|
|
 |
|
 |
1. My class only supports simple MAPI, so the answer is no.
2. Where is the link on my web site which you are referring to?
|
|
|
|
 |