Smtp.NET 3 Documentation

SmtpServer Members

Public Static (Shared) Methods

GetWebPageHtml Downloads the specified URL and puts HTML into a string buffer.
SendQuick Sends simple message that does not allow any other parameters or properties to be set.
Version Specifies the current version of the SmtpDotNet assembly.

Public Instance Constructors

SmtpServerOverloaded. Initialize a new instance of the SmtpServer class.

Public Instance Properties

AltBody An alternate message body displayed in older mail readers that cannot display html formatted messages. Specify this propery only when specifying an HTML formatted message.
AltBodyFile Specifies a file to load the alternate body of the message from.
AltBodyUrl Specifies a URL to load the alternate body of the message from.
AppendLogFile Specifies whether to append the log if it already exists.
AuthLogin The mail server authentication login. Some mail servers require that the user log in before sending messages.
AuthPassword The mail server authenticaton password. Requires AuthLogin.
AutoNameLogFile Specifies whether Smtp.NET should automatically choose a random name for the log file.
BCCAddress The BCC email address.
Body The main message body. This can be plain text, or html text.
BodyFile Specifies a file name to load the body of the message from.
BodyFileFormat The format of the message body loaded from a file using the BodyFile property.
BodyFormat The format of the message body.
BodyUrl Specifies a URL to load the body of the message from.
CCAddress The CC email address.
CCFriendly The message CC "friendly" name. Instead of the CC email address being displayed in the recipient's email reader program, the "friendly" name is displayed.
CharsPerLine Specifies the number of Characeters per line in a MIME part.
ConnectionRetries Specifies the number of additional times a connection should be attempted upon intial connection failure.
ConnectionRetryDelay Specifies the number of milliseconds to wait between retries of failed connection to the mail server.
ContentTransferEncoding Specifies the content-transfer-encoding to use for the message body.
DBDataTable A datatable that contains data to use with the MailMerge or Send methods.
DBEmailColumn The name of the column in the data table that contains email addresses.
DBFriendlyColumn The name of the column in the data table that holds a friendly name for the recipient.
DBRecipientLimit Specifies the maximum number of recipients that can be addressed per message.
DBRecipientType The recipient type for the addresses in the DBDataTable of enumerated type AddressTypes.
EmailCountBad Returns the number of email addresses that were rejected by the mail server for mail delivery.
EmailCountGood Returns the number email addresses that were accepted by the mail server for mail delivery
EmailReport A DataSet that contains two tables: "good" and "bad"
  • The "good" table contains email addresses that were accepted by the email server.
  • The "bad" table contains email addresses that were NOT accepted by the email server.
EmbedImages Specifies whether to embed images in an HTML formatted message.
FromAddress The message FROM address
FromFriendly The message FROM "friendly" name. Instead of the FROM email address being displayed in the recipient's email reader program, the "friendly" name is displayed.
Header Allows additional mail header information
InMemoryLog Specifies whether to log all events to an in-memory buffer instead of a file
LastError Returns the last error encountered.
LastErrorCollection Returns a string collection of all of the error messages in order. Useful for tracing.
LogExceptions Specifies whether to log exceptions. Useful to debug problems with Smtp.NET or connectivitiy with a mail server.
LogFilename The fully qualified pathname of the log file.
LogMailServerMessages Enables or disables logging of SMTP debug messages including all socket messages to and from an SMTP mail server.
MessagePriority The message prority
PickupDirectory Specifies the IIS/Exchange Pickup directory to drop queued email messages into.
Port SMTP mail server port number. The default is 25.
QueueDateTime Specifies the date and time that messages queued for delivery using should be sent.
QueueDirectory Specifies the queue directory. The default is c:\temp\emailQ
QueueFilenames A StringCollection object containing the fully qualified pathname(s) of the files crated for the queue.
RandomObject An object of class Random that is used to ensure uniqueness with Smtp.NET and emailQ.NET queueing. Specifically important if using Smtp.NET in a multithreaded environment.
ReadReceiptFrom Email address to send the read receipt to
ReadReceiptFromFriendly Friendly name to send the read receipt to
ReplyToAddress Specifies the reply-to address
ReplyToFriendly Specifies the friendly name for the reply-to address.
SendDelay Specifies the amount of time in milliseconds to wait before sending the next email message.
SendToPickupDirectory Specifies whether to create a "eml" file that is recognized by IIS/Exchange Smtp Server.
SendToQueue Specifies whether to send messages to emailQ.
ServerAddress SMTP mail server addresses, e.g. mail.domain.com or 192.0.0.1. Separate multiple servers with a comma, e.g. mail.domain.com,192.0.0.1,localhost, etc.
Subject The message subject.
TempDirectory Temporary directory for storing images and files downloaded using the html formatted messaging features AND the directory used when the AutoNameLogFile property is set to true.
TestMode Enables or disables test mode. If test mode is turned on, calling the Send method, the mail message is prepared, the mail server is connected to, but the message is never actually sent.
TimeoutConnect Specifies the Connection timeout in milliseconds.
TimeoutGeneral Specifies the General timeout in milliseconds.
ToAddress The TO email address.
ToFriendly The message TO "friendly" name. Instead of the TO email address being displayed in the recipient's email reader program, the "friendly" name is displayed.
ZipAttachments Specifies whether to zip compress attachments automatically.
ZipCompressionLevel Sets the Zip compression level
ZipFilename Specifies the name of the zip file, which all of the attachments are compressed into. This is the name of the file seen in the email client when the email is opened.

Public Instance Methods

AddAttachmentOverloaded. Adds an attachment to the current message
AddRecipientOverloaded. Add a recipient to the mail message.
Equals (inherited from Object)Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object)Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object)Gets the Type of the current instance.
LogFileToString Returns the current log file as a string.
MailMerge Combines data from the DBDataTable with various properties in the message.
SaveInMemoryLog Saves an in-memory log to a physical file as specified by LogFilename
SendOverloaded. Send the message.
ToString (inherited from Object)Returns a String that represents the current Object.

See Also

SmtpServer Class | SmtpDotNet Namespace