MailBee.NET Objects 3.1

Smtp.ReplyTo Property

Gets or sets EmailAddressCollection object specifying e-mail addresses to which the replies to this message should be sent.

public MailBee.Mime.EmailAddressCollection ReplyTo {get; set;}

Property Value

The EmailAddressCollection object representing Reply-To: field of the message.

Remarks

This property is equivalent to ReplyTo property of Message object.

If this property is not set, most mail programs will send replies to From: address.

Example

Specifying 2 e-mail addresses in Reply-To field.

[C#]
// To use the code below, import these namespaces at the top of your code.
using System;
using MailBee;
using MailBee.SmtpMail;

// The actual code (put it into a method of your class)

Smtp mailer = new Smtp();

mailer.ReplyTo.AsString = "Bill Smith <bsmith@company.com>";
mailer.ReplyTo.Add("John Doe, Sales Manager", "jdoe@domain.com");

Console.WriteLine(mailer.ReplyTo.ToString());

// The output.
"Bill Smith" <bsmith@company.com>, "John Doe, Sales Manager" <jdoe@domain.com>
[Visual Basic]
' To use the code below, import MailBee namespaces at the top of your code.
Imports MailBee
Imports MailBee.SmtpMail

' The actual code (put it into a method of your class)

Dim mailer As New Smtp

mailer.ReplyTo.AsString = "Bill Smith <bsmith@company.com>"
mailer.ReplyTo.Add("John Doe, Sales Manager", "jdoe@domain.com")

Console.WriteLine(mailer.ReplyTo.ToString())

' The output.
"Bill Smith" <bsmith@company.com>, "John Doe, Sales Manager" <jdoe@domain.com>

See Also

Smtp Class | MailBee.SmtpMail Namespace