C# Class SendGrid.Transport.SMTP

Transport class for delivering messages via SMTP
Inheritance: ITransport
显示文件 Open project: advancedrei/sendgridplus-csharp

Public Methods

Method Description
DeliverAsync ( IMail message ) : System.Threading.Tasks.Task

Deliver an email using SMTP protocol

GetInstance ( NetworkCredential credentials, string host = SmtpServer, Int32 port = Port ) : SMTP

Transport created to deliver messages to SendGrid using SMTP

Private Methods

Method Description
Deliver ( IMail message ) : void
GetInstance ( ISmtpClient client, NetworkCredential credentials, string host = SmtpServer, Int32 port = Port ) : SMTP

For Unit Testing Only!

SMTP ( ISmtpClient client, NetworkCredential credentials, string host = SmtpServer, int port = Port ) : System

Transport created to deliver messages to SendGrid using SMTP

Method Details

DeliverAsync() public method

Deliver an email using SMTP protocol
public DeliverAsync ( IMail message ) : System.Threading.Tasks.Task
message IMail
return System.Threading.Tasks.Task

GetInstance() public static method

Transport created to deliver messages to SendGrid using SMTP
public static GetInstance ( NetworkCredential credentials, string host = SmtpServer, Int32 port = Port ) : SMTP
credentials System.Net.NetworkCredential Sendgrid user credentials
host string MTA recieving this message. By default, sent through SendGrid.
port System.Int32 SMTP port 25 is the default. Port 465 can be used for Secure SMTP.
return SMTP