MailBee.NET Objects 3.1

MailMessage.From Property

Gets or sets the e-mail address of the message sender.

public EmailAddress From {get; set;}

Property Value

An EmailAddress object containing the e-mail address of the message sender.

Remarks

The value of this property is taken from From header.

To specify it as a string, set msg.From.AsString value (assuming msg is MailMessage instance).

Exceptions

Exception TypeCondition
MailBeeInvalidArgumentExceptionvalue is a null reference (Nothing in Visual Basic).

Example

The example is available in MailMessage topic.

See Also

MailMessage Class | MailBee.Mime Namespace