Version: 3.1.0.1
Securely send, receive, preview, edit, sign/verify, and encrypt/decrypt email messages in any .NET project. 

Smtp .NET Component

Use the secure Smtp component to send email messages to any SMTP server. The Smtp component is feature-rich and flexible, with many benefits not found in the .NET Platform's native SMTP support such as advanced message composition, .NET Framework Stream support, asynchronous use, access to the TCP connection, advanced debugging utilities, and more. Features include:

  • Select secure (SSL 2.0, SSL 3.0, PCT, TLS) or unencrypted TCP communications.
  • Sessions are automatically managed. No need to explicitly "Login" or "Logout".
  • Send messages synchronously or asynchronously.
  • Progress event reports the current status of the Send operation.
  • Send email with a single line of code.
  • Encrypt Secure MIME (S/MIME) messages
  • Send ANY command to the server using the exposed TCP connection.
  • Trace event exposes the underlying TCP communication.
  • DSN (Delivery Status Notification) fully supported.
  • Supports full Pipelining.
  • C# and VB.NET sample projects included.
  • Integrates with all versions of Visual Studio and supports C#, VB.NET, ASP.NET, Delphi 8, C# Builder, and other .NET compliant development environments.

Looking for an ActiveX version of this product?

Want to validate the email address prior to sending?

Interface

Public Constructors
Smtp Overloaded. Initialize a new instance of the Smtp class.
Public Properties
AutoSize Gets or sets a value indicating if the server will be asked if the message is too large before sending.
Busy Returns true if a method is currently in use.
Certificate

Gets or sets the Certificate used for optional client-side authentication

Client Gets or sets the client hostname or address when a specific interface binding is desired.
ClientPort Gets or sets the client port when a specific local port is desired.
Connected Gets the connected state of the connection.
Connection Gets the Tcp component instance used for the connection.
DoEvents Gets or sets a value that controls the processing of events during blocking method calls.
DSN Returns the DeliveryStatusNotification object that controls DSN use.
Editor In Visual Studio.NET, displays an interactive form to use to test real time protocol operations.
HelloName The hostname sent to the server during the greeting.
MailFrom Use this property to specify the return address that will be used for the "MAIL FROM" SMTP envelope.
Password Gets or sets the password used during session login.
Recipients Use this property to add recipients that will be used for the "RCPT TO" portion of the SMTP envelope.
Security Gets or sets a value that controls the use of SSL encryption.
Server Gets or sets the SMTP server hostname or address.
ServerPort Gets or sets the SMTP server port.
Timeout Specifies the maximum number of milliseconds to wait for responses to commands or time between data buffer transfers.
UseAuthentication Gets or sets a value that controls the authentication of the X509 certificate received from the server.
Username Gets or sets the username used during session login.
Public Methods
BeginSend Overloaded. Asynchronously send a MessageStream object that represents an email message.
Close Ceases all activity and gracefully closes the control connection.
Send Overloaded. Synchronously send a MessageStream object that represents an email message.
Public Events
BusyChanged Raised when the value of the Object.Busy property changes.
CertificateReceived Raised when the server's certificate is received.
CertificateRequested Raised when the server is requesting a client certificate.
ConnectedChanged Raised when the value of the Object.Connected property changes.
EndSend Raised when the Smtp.BeginSend request completes.
Progress Raised repeatedly while an email message is sent.
Trace Raised when data has been sent/received.

Code Example

How easy is it to use the Smtp component? The following example demonstrates sending a simple email message.

VB.NET Example
' First specify the mail server to use
Smtp1.Server = "mail.myserver.com"

' Then use the Send method to send a simple message
Smtp1.Send("you@test.com", "me@test.com", "Test", "This is a test message!")