C# 클래스 Westwind.Utilities.InternetTools.SmtpClientNative

SMTP Wrapper around System.Net.Email.SmtpClient. Provided here mainly to provide compatibility with existing wwSmtp code and to provide a slightly more user friendly front end interface on a single object.
상속: IDisposable
파일 보기 프로젝트 열기: RickStrahl/WestwindToolkit 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
AlternateText string
AlternateTextContentType string
AttachmentList List
Attachments string
BCC string
CC string
CharacterEncoding string
ContentType string
Encoding System.Text.Encoding
Error bool
ErrorMessage string
HandleExceptions bool
Headers string>.Dictionary
LogFile string
MailServer string
Message string
Password string
Priority string
Recipient string
ReplyTo string
ReturnReceipt bool
SenderEmail string
SenderName string
ServerPort int
Subject string
Timeout int
UseSsl bool
UserAgent string
Username string

보호된 프로퍼티들

프로퍼티 타입 설명
AlternateViews List

공개 메소드들

메소드 설명
AddAlternateView ( System.Net.Mail.AlternateView view ) : void

Adds a new Alternate view to the request. Passed from FoxPro which sets up this object.

AddHeader ( string headerName, string value ) : void

Adds an Smtp header to this email request. Headers are always cleared after a message has been sent or failed.

AddHeadersFromString ( string headers ) : void

Adds headers from a CR/LF separate string that has key:value header pairs defined.

Close ( ) : bool

Cleans up and closes the connection

Connect ( ) : bool

Starts a new SMTP session. Note this doesn't actually open a connection but just configures and sets up the SMTP session. The actual connection is opened only when a message is actually sent

Dispose ( ) : void
LoadSmtpClient ( ) : SmtpClient

Lets you load the actual SMTP client instance prior to use so you can manipulate the actual Smtp instance.

SendMail ( ) : bool

Fully self contained mail sending method. Sends an email message by connecting and disconnecting from the email server.

SendMailAsync ( ) : void

Run mail sending operation on a separate thread and asynchronously Operation does not return any information about completion.

SendMessage ( string recipient, string ccList, string bccList ) : bool

Sends an individual message. Allows sending several messages on the same SMTP session without having to reconnect each time. This version assigns default properties assigned from the main mail object and allows overriding only of recipients Call after Connect() has been called and call Close() to close the connection afterwards

보호된 메소드들

메소드 설명
GetMessage ( ) : MailMessage

Configures the message interface

LogString ( string message ) : void

Logs a message to the specified LogFile

SendMailRun ( ) : void

비공개 메소드들

메소드 설명
AssignMailAddresses ( MailAddressCollection address, string recipients ) : void

Assigns mail addresses from a string or comma delimited string list. Facilitates

GetEmailFromFullAddress ( string fullEmail ) : string

Strips out just the email address from a full email address that might contain a display name in the format of: "Web Monitor" <[email protected]>

SetError ( string errorMessage ) : void

Internally used to set errors

메소드 상세

AddAlternateView() 공개 메소드

Adds a new Alternate view to the request. Passed from FoxPro which sets up this object.
public AddAlternateView ( System.Net.Mail.AlternateView view ) : void
view System.Net.Mail.AlternateView
리턴 void

AddHeader() 공개 메소드

Adds an Smtp header to this email request. Headers are always cleared after a message has been sent or failed.
public AddHeader ( string headerName, string value ) : void
headerName string
value string
리턴 void

AddHeadersFromString() 공개 메소드

Adds headers from a CR/LF separate string that has key:value header pairs defined.
public AddHeadersFromString ( string headers ) : void
headers string
리턴 void

Close() 공개 메소드

Cleans up and closes the connection
public Close ( ) : bool
리턴 bool

Connect() 공개 메소드

Starts a new SMTP session. Note this doesn't actually open a connection but just configures and sets up the SMTP session. The actual connection is opened only when a message is actually sent
public Connect ( ) : bool
리턴 bool

Dispose() 공개 메소드

public Dispose ( ) : void
리턴 void

GetMessage() 보호된 메소드

Configures the message interface
protected GetMessage ( ) : MailMessage
리턴 System.Net.Mail.MailMessage

LoadSmtpClient() 공개 메소드

Lets you load the actual SMTP client instance prior to use so you can manipulate the actual Smtp instance.
public LoadSmtpClient ( ) : SmtpClient
리턴 System.Net.Mail.SmtpClient

LogString() 보호된 메소드

Logs a message to the specified LogFile
protected LogString ( string message ) : void
message string
리턴 void

SendMail() 공개 메소드

Fully self contained mail sending method. Sends an email message by connecting and disconnecting from the email server.
public SendMail ( ) : bool
리턴 bool

SendMailAsync() 공개 메소드

Run mail sending operation on a separate thread and asynchronously Operation does not return any information about completion.
public SendMailAsync ( ) : void
리턴 void

SendMailRun() 보호된 메소드

protected SendMailRun ( ) : void
리턴 void

SendMessage() 공개 메소드

Sends an individual message. Allows sending several messages on the same SMTP session without having to reconnect each time. This version assigns default properties assigned from the main mail object and allows overriding only of recipients Call after Connect() has been called and call Close() to close the connection afterwards
public SendMessage ( string recipient, string ccList, string bccList ) : bool
recipient string
ccList string
bccList string
리턴 bool

프로퍼티 상세

AlternateText 공개적으로 프로퍼티

public string AlternateText
리턴 string

AlternateTextContentType 공개적으로 프로퍼티

The content type for the alternate
public string AlternateTextContentType
리턴 string

AlternateViews 보호되어 있는 프로퍼티

protected List AlternateViews
리턴 List

AttachmentList 공개적으로 프로퍼티

List of attachment objects
public List AttachmentList
리턴 List

Attachments 공개적으로 프로퍼티

Any attachments you'd like to send
public string Attachments
리턴 string

BCC 공개적으로 프로퍼티

Blind Copy Recipients
public string BCC
리턴 string

CC 공개적으로 프로퍼티

Carbon Copy Recipients
public string CC
리턴 string

CharacterEncoding 공개적으로 프로퍼티

Character Encoding for the message.
public string CharacterEncoding
리턴 string

ContentType 공개적으로 프로퍼티

The content type of the message. text/plain default or you can set to any other type like text/html
public string ContentType
리턴 string

Encoding 공개적으로 프로퍼티

The character Encoding used to write the stream out to disk Defaults to the default Locale used on the server.
public Encoding,System.Text Encoding
리턴 System.Text.Encoding

Error 공개적으로 프로퍼티

Error Flag set when an error occurs.
public bool Error
리턴 bool

ErrorMessage 공개적으로 프로퍼티

An Error Message if the result is negative or Error is set to true;
public string ErrorMessage
리턴 string

HandleExceptions 공개적으로 프로퍼티

Determines whether wwSMTP passes back errors as exceptions or whether it sets error properties. Right now only error properties work reliably.
public bool HandleExceptions
리턴 bool

Headers 공개적으로 프로퍼티

SMTP headers for this email request
public Dictionary Headers
리턴 string>.Dictionary

LogFile 공개적으로 프로퍼티

An optional file name that appends logging information for the TCP/IP messaging to the specified file.
public string LogFile
리턴 string

MailServer 공개적으로 프로퍼티

Mail Server to send message through. Should be a domain name (mail.yourserver.net) or IP Address (211.123.123.123). You can also provide a port number as part of the string which will override the ServerPort (yourserver.net:211) Class wwSmtp
public string MailServer
리턴 string

Message 공개적으로 프로퍼티

The body of the message.
public string Message
리턴 string

Password 공개적으로 프로퍼티

Password to connect to the mail server.
public string Password
리턴 string

Priority 공개적으로 프로퍼티

Determines the priority of the message
public string Priority
리턴 string

Recipient 공개적으로 프로퍼티

Email address or addresses of the Recipient. Comma delimit multiple addresses. To have formatted names use "Rick Strahl" <[email protected]>
public string Recipient
리턴 string

ReplyTo 공개적으로 프로퍼티

The ReplyTo address
public string ReplyTo
리턴 string

ReturnReceipt 공개적으로 프로퍼티

Determines whether a return receipt is sent
public bool ReturnReceipt
리턴 bool

SenderEmail 공개적으로 프로퍼티

Email address of the sender
public string SenderEmail
리턴 string

SenderName 공개적으로 프로퍼티

Display name of the sender (optional)
public string SenderName
리턴 string

ServerPort 공개적으로 프로퍼티

Port on the mail server to send through. Defaults to port 25.
public int ServerPort
리턴 int

Subject 공개적으로 프로퍼티

Message Subject.
public string Subject
리턴 string

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.
public int Timeout
리턴 int

UseSsl 공개적으로 프로퍼티

Use Tls Security
public bool UseSsl
리턴 bool

UserAgent 공개적으로 프로퍼티

The user agent for the x-mailer
public string UserAgent
리턴 string

Username 공개적으로 프로퍼티

Username to connect to the mail server.
public string Username
리턴 string