mapi

Send an e-mail with rtf text in delphi

谁说胖子不能爱 提交于 2019-12-01 17:27:38
问题 I would like to perform the following task: converting a TRichEdit content (an rtf text) into a not-plain-text e-mail message body. MAPI doesn't support rtf, but is there a way to do it maybe with Indy? The problem is that rtf is rtf and emails are plain text or HTML. Can someone suggest a trick? Is it possible to convert rtf to text using TWebBrowser? Basically the scenario is: 1) User writes email in a delphi form, 2) The email is then sent with MAPI to the default mail client (so a new

Get MAPI Folder in Outlook from Folder Path

守給你的承諾、 提交于 2019-12-01 17:18:41
问题 I am trying to use the function from on this page: http://www.outlookcode.com/d/code/getfolder.htm to use the folder path to navigate to a folder. (I will copy that code onto the bottom of this question--I used it as-is, unmodified at all.) The reason I need to use this is that the default inbox in Outlook is not the same as the inbox I need to be active. I know the path of the relevant inbox by right clicking on it and hit properties, and looking at location. This is the code I use: Set

How to open .eml files using Outlook MAPI in C#?

泄露秘密 提交于 2019-12-01 05:44:17
I have a C# application that reads .msg files and extracts the body and the attachments. But when I try to load a .eml file the application crashes. I am loading the files like this: MailItem mailItem = (MailItem)outlookApp.CreateItemFromTemplate(msgFileName); mailItem.SaveAs(fullFilename, OlSaveAsType.olHTML); // save body in html format for(int i = 0; i < mailItem.Attachments.Count; i++) mailItem.Attachments[i].SaveAsFile(filename); // save attachments This works fine with .msg files, but it doesn't work for .eml files. I don't understand why .eml files don't work, because I can open .eml

How to open .eml files using Outlook MAPI in C#?

佐手、 提交于 2019-12-01 02:51:25
问题 I have a C# application that reads .msg files and extracts the body and the attachments. But when I try to load a .eml file the application crashes. I am loading the files like this: MailItem mailItem = (MailItem)outlookApp.CreateItemFromTemplate(msgFileName); mailItem.SaveAs(fullFilename, OlSaveAsType.olHTML); // save body in html format for(int i = 0; i < mailItem.Attachments.Count; i++) mailItem.Attachments[i].SaveAsFile(filename); // save attachments This works fine with .msg files, but

Open Outlook mail Item using EntryID, StoreID, and / or PR_ENTRYID

别来无恙 提交于 2019-11-30 19:28:45
NOTE: I'm using VBA and Office 2007. (I would use C#, but the project parameters don't allow this) I'm attempting to find some method in Outlook, or an API, that will allow me to open an Outlook mail item by providing either the Outlook EntryID or the MAPI "PR_ENTRYID" property from an Access Database. I have found many references to said code, but I have never seen anyone actually post a solution. I have attempted in include references to mapi32.dll and OLMAPI32.dll, but I get the following error: "Can't add a reference to the specified file." I'm guessing this is because those dll's are

nicely reading outlook mailitem properties

天大地大妈咪最大 提交于 2019-11-30 09:59:10
I am writing a plugin for outlook 2007 and i would like to read a property of a MailItem. In particular i'd like to know all the content-types of my attachments. Now the way i do this now is something like this: Outlook.MailItem item = OutlookItem as Outlook.MailItem; Outlook.Attachments itt = item.Attachments; foreach (Outlook.Attachment t in item.Attachments) { textBox1.Text += t.PropertyAccessor.GetProperty("http://schemas.microsoft.com/mapi/proptag/0x370E001F"); } But I would much rather just call something like. t.PropertyAccessor.GetProperty(PR_ATTACH_MIME_TAG); I can't get that later

Microsoft.Office.Interop.Outlook.Items.Restrict - not working correctly

自闭症网瘾萝莉.ら 提交于 2019-11-30 09:15:49
问题 I can pull email, walk through them, mark them as read, even sort. However, when I tried to restrict by ReceivedTime, it doesn't seem to be working. I get nothing back no matter what date/time I put in. I know ReceivedTime is valid based on the Sort works when I remove the restrict. Any suggestions? Application app = new Application(); NameSpace outlookNs = app.GetNamespace("MAPI"); Microsoft.Office.Interop.Outlook.Folders folders = outlookNs.Folders[ohOptions.PSTName].Folders Microsoft

Open Outlook mail Item using EntryID, StoreID, and / or PR_ENTRYID

北城余情 提交于 2019-11-30 03:32:38
问题 NOTE: I'm using VBA and Office 2007. (I would use C#, but the project parameters don't allow this) I'm attempting to find some method in Outlook, or an API, that will allow me to open an Outlook mail item by providing either the Outlook EntryID or the MAPI "PR_ENTRYID" property from an Access Database. I have found many references to said code, but I have never seen anyone actually post a solution. I have attempted in include references to mapi32.dll and OLMAPI32.dll, but I get the following

Python read my outlook email mailbox and parse messages [duplicate]

徘徊边缘 提交于 2019-11-30 00:48:37
Possible Duplicate: Reading e-mails from Outlook with Python through MAPI I am completely new to Python and have been given the task to write a program that connects to my Microsoft Outlook mailbox, goes through all the emails and if the subject has a certain word, then the details of the email time and subject will be saved in variables, as well as the email message body will be parsed and relevant information will be stored in variables. Then this information will be stored in an external server/database. It also needs to be able to monitor any new emails that comes to my mailbox and repeat

email using Access and VBA without MAPI

走远了吗. 提交于 2019-11-29 14:21:24
I would like to send email from Microsoft Access unattended using VBA. I understand that the built-in method “SendObject” uses MAPI meaning security prompts and something like Outlook configured. Since I want to use the Task Scheduler to kick off different reports, I’m leaning away from MAPI and would prefer some other solution. Not an application for shipping but just in-house. Ideas? You'll need an SMTP server that will allow you to send email. Then you need to use the CDO message object. Knox Here's the test code that worked for me with CDO and gmail. Sub mtest() Dim cdoConfig Dim msgOne