Load

MailMessage.Load method (1 of 4)

Load message from file

public static MailMessage Load(string fileName)
Parameter Type Description
fileName String Message file name. The message file must be in eml or msg format.

Return Value

E-mail message

See Also


MailMessage.Load method (2 of 4)

Load message from stream

public static MailMessage Load(Stream stream)
Parameter Type Description
stream Stream Stream that represents message in eml or msg format

Return Value

E-mail message

See Also


MailMessage.Load method (3 of 4)

Load message from file with additional options.

public static MailMessage Load(string fileName, LoadOptions options)
Parameter Type Description
fileName String Source file pathString.
options LoadOptions Additional options LoadOptions.

Return Value

Mail messageMailMessage.

Exceptions

exception condition
ArgumentNullException If fileName is null.

See Also


MailMessage.Load method (4 of 4)

Load message from stream with additional options.

public static MailMessage Load(Stream stream, LoadOptions options)
Parameter Type Description
stream Stream Source streamStream.
options LoadOptions Additional options LoadOptions.

Return Value

Mail messageMailMessage.

Exceptions

exception condition
ArgumentNullException If stream is null.

See Also