Click or drag to resize
MimeKit

SmtpClientGetSize Method

Get the size of the message.

Namespace: MailKit.Net.Smtp
Assembly: MailKit (in MailKit.dll) Version: 4.3.0
Syntax
C#
protected virtual long GetSize(
	FormatOptions options,
	MimeMessage message,
	CancellationToken cancellationToken
)

Parameters

options  FormatOptions
The formatting options.
message  MimeMessage
The message.
cancellationToken  CancellationToken
The cancellation token.

Return Value

Int64
The size of the message, in bytes.
Remarks

Calculates the size of the message in bytes.

This method is called by Send methods in the following conditions:

  • The SMTP server supports the SIZE= parameter in the MAIL FROM command.
  • The ITransferProgress parameter is non-null.
  • The SMTP server supports the CHUNKING extension.
See Also