SmtpAuthPopBeforeSmtp Method
Authenticates the user on a mail server using POP-before-SMTP authentication.

Namespace: MailBee.SmtpMail
Assembly: MailBee.NET (in MailBee.NET.dll) Version: 12.2.0 build 630 for .NET 4.5
public bool AuthPopBeforeSmtp(
	string pop3ServerName,
	int pop3ServerPort,
	string pop3AccountName,
	string pop3Password


Type: SystemString
The host name or IP address of the POP3 server.
Type: SystemInt32
The port on which POP3 service is running.
Type: SystemString
The user account name on the POP3 server.
Type: SystemString
The user account password on the POP3 server.

Return Value

Type: Boolean
true if the method succeeds; otherwise, false.
MailBeeExceptionAn error occurred and ThrowExceptions is true.
This method can be used to authenticate the user on the SMTP server if the SMTP server itself does not support ESMTP authentication, but can use results of POP3 authentication performed against a POP3 server which shares the users accounts database with the given SMTP server (usually, this POP3 server is running on the same host where the SMTP server is running).
Note Note
The developer can also enable automatic use of POP-before-SMTP authentication when connecting to the SMTP server by setting AuthPopBeforeSmtp property value to true. However, use of AuthPopBeforeSmtp(String, Int32, String, String) method is more flexible, since AuthPopBeforeSmtp(String, Int32, String, String) method can also be used in scenarios when the POP3 server name/account name/password is different from the corresponding parameters of the companion SMTP server.
This samples performs POP-before-SMTP authentication on host prior to connecting to the SMTP server at
// To use the code below, import MailBee namespaces at the top of your code.
using MailBee;
using MailBee.SmtpMail;

// The actual code (put it into a method of your class)

Smtp mailer = new Smtp();

mailer.AuthPopBeforeSmtp("", 110, "jdoe", "secret");

See Also