MailBee.NET Objects 4.0

SmtpServer.MaxSendPerSessionCount Property

Gets or sets the maximum number of e-mail messages which can be sent within a single connection with the server.

public int MaxSendPerSessionCount {get; set;}

Property Value

Non-zero integer specifying the maximum number of e-mail messages which can be successfully submitted to the SMTP relay server within a single session. The default value is -1 (number of submissions per session is unlimited).

Remarks

To prevent abuse or spam, many mail servers limit the maximum number of e-mail messages accepted from a client during a single SMTP session. The developer can use MaxSendPerSessionCount property to restrict the number of e-mail submissions from MailBee to the SMTP relay server within a single session. When this number is exceeded, MailBee will disconnect from the server and either use another server (if SmtpServers collection contains other servers with the same or higher priority) or wait for PauseInterval milliseconds and then attempt to connect to the server again to send another portion of the messages.

Exceptions

Exception Type Condition
MailBeeInvalidArgumentException value is zero.

See Also

SmtpServer Class | MailBee.SmtpMail Namespace | PauseInterval