The INetSmtpClient interface contains properties and methods for email messages sending using the SMTP mail service built in Windows.
SMTP client described with this interface enables the user to send emails to the mail server, address of which is specified on initializing of the SMTP client in the NetSmtpClient.CreateWithHost or NetSmtpClient.CreateWithHostAndPort designer. The mail server relays an email to other mail servers according to the information about recipients. If authorization is required, it is necessary to specify appropriate account credentials on the mail server in the ThisHostCredentials property.
If required, mail server and port information can be changed in the Host and Port properties. After that SMTP client can be used again to send any other emails.
NOTE. If SMTP server is accessed from the local network via proxy server, it is required to check if access permissions for the SMTP server port in use are contained in the proxy server.
| Property name | Brief description | |
| The Credentials property returns the credentials used for the outgoing mail server authorization. | ||
| EnableSsl | The EnableSsl property determines whether SSL encryption is required to send messages via external mail servers. | |
| The Host property determines the name or the IP-address of a sending mail SMTP server. | ||
| The Port property determines the port through which the message sending is performed. | ||
| The ThisHostCredentials property determines the credentials of the SMTP sending mail server that is used in email messages sending. | ||
| The Timeout property determines the latency period for a message to be sent to server waiting. | ||
| The UseDefaultCredentials property determines whether to use for all the queries the system accounts for the current security context in which the application is executed. |
| Method name | Brief description | |
| The Send method sends an email message. |
See also:
Net Assembly Interfaces | INetMapiClient | Sending Emails via Various SMTP Servers