SmtpTo Property
Gets or sets EmailAddressCollection object specifying To: recipients of the message.

Namespace: MailBee.SmtpMail
Assembly: MailBee.NET (in MailBee.NET.dll) Version: 12.2.0 build 630 for .NET 4.5
public EmailAddressCollection To { get; set; }

Property Value

Type: EmailAddressCollection
The EmailAddressCollection object representing To: field of the message.
This property is equivalent to To property of Message object.
Setting To: recipients using different methods.
// To use the code below, import MailBee namespaces at the top of your code.
using System;
using MailBee;
using MailBee.SmtpMail;
using MailBee.Mime;

// The actual code (put it into a method of your class).
Smtp mailer = new Smtp();

mailer.To.Add("John Doe, Sales Manager", "");
mailer.To.Add(new EmailAddress(""));
mailer.To.AsString += "Bill Smith <>,, \"John Long, Jr.\" <>";


// The output., "John Doe, Sales Manager" <>,, "Bill Smith" <>,, "John Long, Jr." <>
See Also