C# Класс Rolcore.Net.Mail.EmailUtils

Utilities that simplify email related tasks.
Показать файл Открыть проект

Открытые методы

Метод Описание
CreateMessage ( string to, string cc, string bcc, string from, string subject, string body, bool isBodyHtml ) : MailMessage

Creates and configures a MailMessage.

LenientIsEmailAddress ( string email ) : bool

Validates an email address according to lenient rules.

SendEmail ( MailMessage message, string smtpServer = null ) : void

Sends the given message via email using the given SMTP server.

StrictIsEmailAddress ( string email ) : bool

Validates an email address according to strict rules.

Приватные методы

Метод Описание
CreateLenientEmailAddressMatcher ( ) : Regex
CreateStrictEmailAddressMatcher ( ) : Regex

Описание методов

CreateMessage() публичный статический Метод

Creates and configures a MailMessage.
public static CreateMessage ( string to, string cc, string bcc, string from, string subject, string body, bool isBodyHtml ) : MailMessage
to string The value for
cc string
bcc string The value for
from string The value for
subject string The value for
body string The value for
isBodyHtml bool
Результат System.Net.Mail.MailMessage

LenientIsEmailAddress() публичный статический Метод

Validates an email address according to lenient rules.
public static LenientIsEmailAddress ( string email ) : bool
email string The email address to validate
Результат bool

SendEmail() публичный статический Метод

Sends the given message via email using the given SMTP server.
public static SendEmail ( MailMessage message, string smtpServer = null ) : void
message System.Net.Mail.MailMessage The message to send.
smtpServer string The SMTP server to send the message through.
Результат void

StrictIsEmailAddress() публичный статический Метод

Validates an email address according to strict rules.
public static StrictIsEmailAddress ( string email ) : bool
email string The email address to validate.
Результат bool