Table of Contents

Method PermitsMessageOfSize

Namespace
MailFathom.Application.Mail.Delivery
Assembly
MailFathom.Application.dll

PermitsMessageOfSize(long)

Reports whether a message of the supplied size is within what the server declared it will accept.

public bool PermitsMessageOfSize(long messageBytes)

Parameters

messageBytes long

The size of the message as it would be transmitted.

Returns

bool

true when the server declared no bound or the message is within it.

Remarks

The comparison is inclusive, because the size extension states the largest message that is accepted rather than the first one that is not. A server declaring no bound permits every size here and may still refuse a message for a reason of its own; this answers what the server said, not what it will do.

Exceptions

ArgumentOutOfRangeException

Thrown when messageBytes is negative.