/// <summary> /// Transport created to deliver messages to SendGrid using SMTP /// </summary> /// <param name="credentials">Sendgrid user credentials</param> /// <param name="host">MTA recieving this message. By default, sent through SendGrid.</param> /// <param name="port">SMTP port 25 is the default. Port 465 can be used for Secure SMTP.</param> public static SMTP GetInstance(NetworkCredential credentials, String host = SmtpServer, Int32 port = Port) { var client = new SmtpWrapper(host, port, credentials, SmtpDeliveryMethod.Network); return new SMTP(client, credentials, host, port); }
/// <summary> /// Transport created to deliver messages to SendGrid using SMTP /// </summary> /// <param name="credentials">Sendgrid user credentials</param> /// <param name="host">MTA recieving this message. By default, sent through SendGrid.</param> /// <param name="port">SMTP port 25 is the default. Port 465 can be used for Secure SMTP.</param> public static SMTP GetInstance(NetworkCredential credentials, String host = SmtpServer, Int32 port = Port) { var client = new SmtpWrapper(host, port, credentials, SmtpDeliveryMethod.Network); return(new SMTP(client, credentials, host, port)); }