Beispiel #1
0
 private void GetRecipientsCollection(IList <string> addresses, Outlook.OlMailRecipientType type)
 {
     if (addresses.Count > 0)
     {
         addresses.Each(r =>
         {
             Outlook.Recipient rcp = _olMailItem.Recipients.Add(r);
             rcp.Type = (int)type;
         });
     }
 }
Beispiel #2
0
        public static void AddRecipients(this Outlook.MailItem mail, IList <IEmailGroup> addresses, Outlook.OlMailRecipientType type)
        {
            addresses.EachAsync(a =>
            {
                Outlook.Recipient rcp = mail.Recipients.Add(a.EmailAddress.Address);
                rcp.Type = (int)type;
            });

            /*foreach (string address in addresses)
             * {
             *  Outlook.Recipient rcp = mail.Recipients.Add(address);
             *  rcp.Type = (int)type;
             * }*/
        }
 internal RecipType(Outlook.OlMailRecipientType type, string text)
 {
     this.type = type;
     this.text = text;
 }