cdo.message

Fetching gmail inbox mail messages via CDO in vba excel

非 Y 不嫁゛ 提交于 2019-12-06 05:13:06
I would like to access the inbox in a gmail account using CDO in VBA. I have already managed to send a mail message but do not know how to fetch the inbox messages into an excel sheet. If possible I would like to be able to identify the tags of each message as well. Tim Hall While the question asks for CDO in particular, from this similar SO question it doesn't look like this is possible directly with CDO. As an alternative approach to fetching inbox mail messages, Google has recently released a Gmail API that could be consumed with Excel. Below is an example using VBA-Web : ' Setup client and

VBScript SMTP Auto Email

会有一股神秘感。 提交于 2019-12-04 22:52:36
I have a script to auto email a list of address' stored in Excel, but it is only sending to the first address and not looping to the rest, I cannot seem to fix it: Set objMessage = CreateObject("CDO.Message") Set app = CreateObject("Excel.Application") Set fso = CreateObject("Scripting.FileSystemObject") For Each f In fso.GetFolder("Y:\Billing_Common\autoemail").Files If LCase(fso.GetExtensionName(f)) = "xls" Then Set wb = app.Workbooks.Open(f.Path) set sh = wb.Sheets("Auto Email Script") row = 2 email = sh.Range("A" & row) LastRow = sh.UsedRange.Rows.Count Const ForReading = 1, ForWriting = 2

Is it OK to install CDO 1.21 with Exchange Server 2010 SP3/ Windows Server 2012?

久未见 提交于 2019-12-02 17:56:16
问题 We are upgrading our server to Windows 2012 from 2003. Our application use CDO 1.21 and MAPI to send mails, I know I have to use SMTP/ OOM/AWS. At this late stage I don't want to do make changes in our programs right now - there are 80+ :) When I am going to MS site to download CDO 1.21, Windows 2102/Exchange Server 2010 SP3 is not specified under supported platforms. I am able to download CDO 1.21 for Win 2012. But now when I am connecting via MAPI, System is throwing error: The information

CDOSYS and Unicode in the from field

瘦欲@ 提交于 2019-12-02 12:52:10
I've got the code below, and I'm trying to set the from field to allow Unicode. Currently in my email client I get "??". The subject line and any content shows the Unicode correctly. And looking at the MSDN, the property should be "urn:schemas:httpmail:from" . Anyone solved this issue? Dim AC_EMAIL : AC_EMAIL = "test@test.com" Dim AC_EMAIL_FROM : AC_EMAIL_FROM = "测试 <test@test.com>" Dim strSubject : strSubject = """测试"" testing testing" set oMessage = WScript.CreateObject("CDO.Message") With oMessage .BodyPart.charset = "utf-8" 'unicode-1-1-utf-8 .Fields("urn:schemas:httpmail:from") = AC_EMAIL

Unknown email code from CDO.Message send method

為{幸葍}努か 提交于 2019-12-01 14:39:15
I'm trying to send an email via vbscript. Here's my email code: I've hidden the email address of course. In my actual code I'm using a valid email address. Dim objCDO Set objCDO = Server.CreateObject("CDO.Message") objCDO.Configuration.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "smtp.oa.caiso.com" objCDO.Configuration.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25 objCDO.Configuration.Fields("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 objCDO.Configuration.Fields("http://schemas.microsoft.com/cdo/configuration

Unknown email code from CDO.Message send method

放肆的年华 提交于 2019-12-01 13:21:51
问题 I'm trying to send an email via vbscript. Here's my email code: I've hidden the email address of course. In my actual code I'm using a valid email address. Dim objCDO Set objCDO = Server.CreateObject("CDO.Message") objCDO.Configuration.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "smtp.oa.caiso.com" objCDO.Configuration.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25 objCDO.Configuration.Fields("http://schemas.microsoft.com/cdo

Extracting Embedded Images From Outlook Email

▼魔方 西西 提交于 2019-11-29 22:20:41
问题 I am using Microsoft's CDO (Collaboration Data Objects) to programmatically read mail from an Outlook mailbox and save embedded image attachments. I'm trying to do this from Python using the Win32 extensions, but samples in any language that uses CDO would be helpful. So far, I am here... The following Python code will read the last email in my mailbox, print the names of the attachments, and print the message body: from win32com.client import Dispatch session = Dispatch('MAPI.session')

Send mail with CDO through Google Apps gives transport error: CDO.Message.1 error '80040213'

依然范特西╮ 提交于 2019-11-29 17:37:56
I'm trying to send an contact enquiry email from a legacy classic asp script using a Google Apps account as the SMTP server. The code I have to test this is as follows: Dim ObjSendMail Set ObjSendMail = CreateObject("CDO.Message") 'This section provides the configuration information for the remote SMTP server. ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 'Send the message using the network (SMTP over the network). ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserver") ="mail.thedomain.com"

Send mail with CDO through Google Apps gives transport error: CDO.Message.1 error '80040213'

。_饼干妹妹 提交于 2019-11-28 11:55:24
问题 I'm trying to send an contact enquiry email from a legacy classic asp script using a Google Apps account as the SMTP server. The code I have to test this is as follows: Dim ObjSendMail Set ObjSendMail = CreateObject("CDO.Message") 'This section provides the configuration information for the remote SMTP server. ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 'Send the message using the network (SMTP over the network). ObjSendMail

How to add an embedded image to an HTML message in Outlook 2010

烂漫一生 提交于 2019-11-26 21:44:04
问题 I have Office 2003 VBA code that uses the technique described here to embed an image in an HTML message using undocumented MAPI properties and CDO 1.21. CDO 1.21 is no longer supported, but according to MSDN, most of its functionality is now incorporated into the Outlook 2010 object model. Where can I find a sample that embeds images in an Outlook 2010 message using the Outlook 2010 object model? 回答1: Found the answer here. The key bits being: Const PR_ATTACH_MIME_TAG = "http://schemas