C# 클래스 GSF.Net.Smtp.Mail

A wrapper class to the MailMessage class that simplifies sending mail messages.
상속: IDisposable
파일 보기 프로젝트 열기: GridProtectionAlliance/gsf 1 사용 예제들

공개 메소드들

메소드 설명
Dispose ( ) : void

Releases all the resources used by the Mail object.

Mail ( ) : System

Initializes a new instance of the Mail class.

Mail ( string from ) : System

Initializes a new instance of the Mail class.

Mail ( string from, string toRecipients ) : System

Initializes a new instance of the Mail class.

Mail ( string from, string toRecipients, string smtpServer ) : System

Initializes a new instance of the Mail class.

Send ( ) : void

Send the Mail message with Attachments to the ToRecipients, CcRecipients and BccRecipients using the specified SmtpServer.

Send ( string from, string toRecipients, string subject, string body, bool isBodyHtml, string smtpServer ) : void

Sends a Mail message.

Send ( string from, string toRecipients, string subject, string body, bool isBodyHtml, string attachments, string smtpServer ) : void

Sends a Mail message.

Send ( string from, string toRecipients, string subject, string body, bool isBodyHtml, string smtpServer, string username, SecureString password ) : void

Sends a secure Mail message.

Send ( string from, string toRecipients, string subject, string body, bool isBodyHtml, string smtpServer, string username, SecureString password, bool enableSSL ) : void

Sends a secure Mail message.

Send ( string from, string toRecipients, string subject, string body, bool isBodyHtml, string smtpServer, string username, string password ) : void

Sends a secure Mail message.

Send ( string from, string toRecipients, string subject, string body, bool isBodyHtml, string smtpServer, string username, string password, bool enableSSL ) : void

Sends a secure Mail message.

Send ( string from, string toRecipients, string ccRecipients, string bccRecipients, string subject, string body, bool isBodyHtml, string smtpServer ) : void

Sends a Mail message.

Send ( string from, string toRecipients, string ccRecipients, string bccRecipients, string subject, string body, bool isBodyHtml, string attachments, string smtpServer ) : void

Sends a Mail message.

보호된 메소드들

메소드 설명
Dispose ( bool disposing ) : void

Releases the unmanaged resources used by the Mail object and optionally releases the managed resources.

비공개 메소드들

메소드 설명
ApplySecuritySettings ( ) : void

메소드 상세

Dispose() 공개 메소드

Releases all the resources used by the Mail object.
public Dispose ( ) : void
리턴 void

Dispose() 보호된 메소드

Releases the unmanaged resources used by the Mail object and optionally releases the managed resources.
protected Dispose ( bool disposing ) : void
disposing bool true to release both managed and unmanaged resources; false to release only unmanaged resources.
리턴 void

Mail() 공개 메소드

Initializes a new instance of the Mail class.
public Mail ( ) : System
리턴 System

Mail() 공개 메소드

Initializes a new instance of the Mail class.
public Mail ( string from ) : System
from string The e-mail address of the message sender.
리턴 System

Mail() 공개 메소드

Initializes a new instance of the Mail class.
public Mail ( string from, string toRecipients ) : System
from string The e-mail address of the message sender.
toRecipients string A comma-separated or semicolon-separated e-mail address list of the message recipients.
리턴 System

Mail() 공개 메소드

Initializes a new instance of the Mail class.
public Mail ( string from, string toRecipients, string smtpServer ) : System
from string The e-mail address of the message sender.
toRecipients string A comma-separated or semicolon-separated e-mail address list of the message recipients.
smtpServer string The name or IP address of the SMTP server to be used for sending the message.
리턴 System

Send() 공개 메소드

Send the Mail message with Attachments to the ToRecipients, CcRecipients and BccRecipients using the specified SmtpServer.
public Send ( ) : void
리턴 void

Send() 공개 정적인 메소드

Sends a Mail message.
public static Send ( string from, string toRecipients, string subject, string body, bool isBodyHtml, string smtpServer ) : void
from string The e-mail address of the message sender.
toRecipients string A comma-separated or semicolon-separated e-mail address list of the message recipients.
subject string The subject of the message.
body string The body of the message.
isBodyHtml bool true if the message body is to be formated as HTML; otherwise false.
smtpServer string The name or IP address of the SMTP server to be used for sending the message.
리턴 void

Send() 공개 정적인 메소드

Sends a Mail message.
public static Send ( string from, string toRecipients, string subject, string body, bool isBodyHtml, string attachments, string smtpServer ) : void
from string The e-mail address of the message sender.
toRecipients string A comma-separated or semicolon-separated e-mail address list of the message recipients.
subject string The subject of the message.
body string The body of the message.
isBodyHtml bool true if the message body is to be formated as HTML; otherwise false.
attachments string A comma-separated or semicolon-separated list of file names to be attached to the message.
smtpServer string The name or IP address of the SMTP server to be used for sending the message.
리턴 void

Send() 공개 정적인 메소드

Sends a secure Mail message.
public static Send ( string from, string toRecipients, string subject, string body, bool isBodyHtml, string smtpServer, string username, SecureString password ) : void
from string The e-mail address of the message sender.
toRecipients string A comma-separated or semicolon-separated e-mail address list of the message recipients.
subject string The subject of the message.
body string The body of the message.
isBodyHtml bool true if the message body is to be formated as HTML; otherwise false.
smtpServer string The name or IP address of the SMTP server to be used for sending the message.
username string The username of the account used to authenticate to the SMTP server.
password System.Security.SecureString The password of the account used to authenticate to the SMTP server.
리턴 void

Send() 공개 정적인 메소드

Sends a secure Mail message.
public static Send ( string from, string toRecipients, string subject, string body, bool isBodyHtml, string smtpServer, string username, SecureString password, bool enableSSL ) : void
from string The e-mail address of the message sender.
toRecipients string A comma-separated or semicolon-separated e-mail address list of the message recipients.
subject string The subject of the message.
body string The body of the message.
isBodyHtml bool true if the message body is to be formated as HTML; otherwise false.
smtpServer string The name or IP address of the SMTP server to be used for sending the message.
username string The username of the account used to authenticate to the SMTP server.
password System.Security.SecureString The password of the account used to authenticate to the SMTP server.
enableSSL bool The flag that determines whether to use SSL when communicating with the SMTP server.
리턴 void

Send() 공개 정적인 메소드

Sends a secure Mail message.
public static Send ( string from, string toRecipients, string subject, string body, bool isBodyHtml, string smtpServer, string username, string password ) : void
from string The e-mail address of the message sender.
toRecipients string A comma-separated or semicolon-separated e-mail address list of the message recipients.
subject string The subject of the message.
body string The body of the message.
isBodyHtml bool true if the message body is to be formated as HTML; otherwise false.
smtpServer string The name or IP address of the SMTP server to be used for sending the message.
username string The username of the account used to authenticate to the SMTP server.
password string The password of the account used to authenticate to the SMTP server.
리턴 void

Send() 공개 정적인 메소드

Sends a secure Mail message.
public static Send ( string from, string toRecipients, string subject, string body, bool isBodyHtml, string smtpServer, string username, string password, bool enableSSL ) : void
from string The e-mail address of the message sender.
toRecipients string A comma-separated or semicolon-separated e-mail address list of the message recipients.
subject string The subject of the message.
body string The body of the message.
isBodyHtml bool true if the message body is to be formated as HTML; otherwise false.
smtpServer string The name or IP address of the SMTP server to be used for sending the message.
username string The username of the account used to authenticate to the SMTP server.
password string The password of the account used to authenticate to the SMTP server.
enableSSL bool The flag that determines whether to use SSL when communicating with the SMTP server.
리턴 void

Send() 공개 정적인 메소드

Sends a Mail message.
public static Send ( string from, string toRecipients, string ccRecipients, string bccRecipients, string subject, string body, bool isBodyHtml, string smtpServer ) : void
from string The e-mail address of the message sender.
toRecipients string A comma-separated or semicolon-separated e-mail address list of the message recipients.
ccRecipients string A comma-separated or semicolon-separated e-mail address list of the message carbon copy (CC) recipients.
bccRecipients string A comma-separated or semicolon-separated e-mail address list of the message blank carbon copy (BCC) recipients.
subject string The subject of the message.
body string The body of the message.
isBodyHtml bool true if the message body is to be formated as HTML; otherwise false.
smtpServer string The name or IP address of the SMTP server to be used for sending the message.
리턴 void

Send() 공개 정적인 메소드

Sends a Mail message.
public static Send ( string from, string toRecipients, string ccRecipients, string bccRecipients, string subject, string body, bool isBodyHtml, string attachments, string smtpServer ) : void
from string The e-mail address of the message sender.
toRecipients string A comma-separated or semicolon-separated e-mail address list of the message recipients.
ccRecipients string A comma-separated or semicolon-separated e-mail address list of the message carbon copy (CC) recipients.
bccRecipients string A comma-separated or semicolon-separated e-mail address list of the message blank carbon copy (BCC) recipients.
subject string The subject of the message.
body string The body of the message.
isBodyHtml bool true if the message body is to be formated as HTML; otherwise false.
attachments string A comma-separated or semicolon-separated list of file names to be attached to the message.
smtpServer string The name or IP address of the SMTP server to be used for sending the message.
리턴 void