-
September 19th, 2001, 09:03 PM
#1
E-mail
I need to read all messages in Inbox ( or Sent Items folder )in OUTLOOK. Is anybody who was working on the same problem before?
I found a lot of examples, but there seems to me very complicated ( EXCHANGE API or VB examples). All I need is open particular folder and read ( and display) messages located in folder ( Inbox or Sent Items). Just simple solution.
Thanks for your help and I appreciate it.
Frank
-
September 20th, 2001, 12:20 AM
#2
Re: E-mail
Hi Frank,
You can use CDO(Collaboration Data Objects) to access your messaging services.Internally it uses MAPI to get all the things done. you can have a look at the samples in the following location which does exactly what you want.
http://support.microsoft.com/support.../Q178/4/80.ASP
Hope this helped you!
-Amudhan
-Amudhan
-
September 20th, 2001, 01:12 AM
#3
Re: E-mail
If you have Windows 2000 you can use CDOSYS. If you have IIS installed or can install it, then you can use CDONTS. If you want a solution that is guaranteed to work on any Windows system, I think you can use MAPI and I think there are useful samples at:
http://msdn.microsoft.com/library/de...pi_samples.asp
CDO is much easier than MAPI but MAPI is older and you can probably assume it will be already available in any (32-bit) system.
****************************************************************************************************
Ratings are unimportant but follow-up is. Try to somehow let the helper and the worldwide community know what works.
-
September 20th, 2001, 06:26 AM
#4
Re: E-mail
Thanks,
but I can't find in given example information how to read message. I know how to send message, attach file.... I need only read messages in Inbox folder. Some simple solution.
Frank
-
September 20th, 2001, 07:26 AM
#5
Re: E-mail
Hi, if you want only the list of message it there in the code sample.
but if you want to read a particular message
try using the following code sample!
I haven't tried it. but got form MSDN!
void Save_Message_to_File(IMessagePtr iMsg, bstr_t filename)
{
/*
** This example shows a common use of the ADO Stream
** object with CDO, namely, saving a serialized
** message to disk using an ADO Stream object.
**/
_StreamPtr pStm(__uuidof(Stream));
IDataSourcePtr iDsrc;
iDsrc = iMsg;
_variant_t varOptional(DISP_E_PARAMNOTFOUND,VT_ERROR);
pStm->raw_Open(
varOptional,
adModeUnknown,
adOpenStreamUnspecified,
NULL,
NULL);
pStm->Type = adTypeText;
pStm->Charset = "US-ASCII"; // apparently, we need this!
try
{
iDsrc->SaveToObject(pStm,_bstr_t("_Stream"));
}
catch(_com_error error)
{
throw error;
}
try {
pStm->SaveToFile(filename,adSaveCreateOverWrite);
}
catch(_com_error e)
{
throw e;
}
}
Hope this helps!
-Amudhan
-
September 20th, 2001, 07:33 AM
#6
Re: E-mail
Thanks a lot for your help.
-
March 26th, 2003, 11:11 AM
#7
Hi Amudhan G,
I run your example code and it 's OK on Windows 2000
but it cannot be run on WINNT 4
Please give me another example if you can.
or give me any ideas.
thank you.
-
March 26th, 2003, 11:13 AM
#8
hi
http://msdn.microsoft.com/library/d...api_samples.asp
I tried to find examples but I cannot
....
please tell me where
thks
-
April 15th, 2003, 01:49 PM
#9
All i need to do is send messages!
This what I need to do...
Take the email address form the list of contacts(In MS Outlook),
send it an email message,in the email message the text will be same for all the emails,
Only at the top i should have
Dear $$$$$
where $$$$ is the name that I get from the contact,
so it would be like
Dear Xeon
(email message)
Dear Sam
(email message)
Dear Codeguru
(email message)
and so on and so forth till I have sent an email to all the contacts in the contact list.
I have to add an attachment file as well but it will be the same for all the contacts
Also I will need to set the subject too I guess through the program...
I will be using vc++......
I have to get this done as soon as possible,any help,code is very much needed and appreciated
1. Search in MSDN
2. Search in Google
3. Search in CodeGuru.com
4. Ask in the forum
ABNM.....asih b*&6 nahi mardeh
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|