A free standing SMTP implementation that doesn't rely on CDONTS or COM Interop. Minimal implementation supports only basic functionality at this time.
Westwind.Utilities.InternetTools.SmtpClientCustom
public class SmtpClientCustom : object
Class Members
Member | Description | |
---|---|---|
Constructor |
||
SendComplete |
Event fired when sending of a message or multiple messages is complete and the connection is to be closed. This event occurs only once per connection as opposed to the MessageSendComplete event which fires after each message is sent regardless of the number of SendMessage operations. | |
SendError |
Event fired when an error occurs during processing and before the connection is closed down. | |
BCC |
Blind Copy Recipients | |
CC |
Carbon Copy Recipients | |
CharacterEncoding |
Character Encoding for the message. | |
ContentType |
The content type of the message. text/plain default or you can set to any other type like text/html | |
Encoding |
The character Encoding used to write the stream out to disk Defaults to the default Locale used on the server. | |
Error |
Error Flag set when an error occurs. | |
ErrorMessage |
An Error Message if the result is negative or Error is set to true; | |
HandleExceptions |
Determines whether wwSMTP passes back errors as exceptions or whether it sets error properties. Right now only error properties work reliably. | |
LogFile |
An optional file name that appends logging information for the TCP/IP messaging to the specified file. | |
MailServer |
Mail Server to send message through. Should be a domain name (mail.yourserver.net) or IP Address (211.123.123.123). | |
Message |
The body of the message. | |
Password |
Password to connect to the mail server. | |
Recipient |
Email address or addresses of the Recipient. Comma delimit multiple addresses. To have formatted names use "Rick Strahl" rstrahl@west-wind.com | |
SenderEmail |
Email address of the sender | |
SenderName |
Display name of the sender (optional) | |
ServerPort |
Port on the mail server to send through. Defaults to port 25. | |
Subject |
Message Subject. | |
Timeout |
Connection timeouts for the mail server in seconds. If this timeout is exceeded waiting for a connection or for receiving or sending data the request is aborted and fails. | |
Username |
Username to connect to the mail server. | |
Connect |
Connects to the mail server. public bool Connect() |
|
SendMail |
Fully self contained mail sending method. Sends an email message by connecting and disconnecting from the email server. public bool SendMail() |
|
SendMailAsync |
Fully self contained method that sends email by just sending without waiting for confirmation by starting a new thread public void SendMailAsync() |
|
SendMessage |
Low level SendMessage method. Requires that Connect() be called first to open a connection. You can call this method multiple times without reconnecting to send multiple messages. public bool SendMessage() |
Requirements
Namespace: Westwind.Utilities.InternetToolsAssembly: westwind.utilities.dll
© West Wind Technologies, 1996-2016 • Updated: 12/12/15
Comment or report problem with topic