Delphi - Adding BCC & CC Recipients to OLE Outlook object

拥有回忆 提交于 2019-12-06 16:30:19
Eugene Astafiev

The Add() method of the Recipients collection creates and returns a new Recipient object. The Type property of the Recipient class allows to set an integer representing the type of recipient. For MailItem recipients, it can be one of the following OlMailRecipientType constants: olBCC, olCC, olOriginator, or olTo. The default Type for a new mail recipient is olTo.

MailItem.Recipients.Add('someone@yahoo.com'); // Type=1 olTo
MailItem.Recipients.Add('joesmoe@yahoo.com').Type := 2; // olCC
MailItem.Recipients.Add('alice@yahoo.com').Type := 3; // olBCC

You may find the How To: Fill TO,CC and BCC fields in Outlook programmatically article helpful.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!