diff options
Diffstat (limited to 'SendGrid/SendGridMail/SendGrid.cs')
-rw-r--r-- | SendGrid/SendGridMail/SendGrid.cs | 37 |
1 files changed, 18 insertions, 19 deletions
diff --git a/SendGrid/SendGridMail/SendGrid.cs b/SendGrid/SendGridMail/SendGrid.cs index cc87ffd..9708c82 100644 --- a/SendGrid/SendGridMail/SendGrid.cs +++ b/SendGrid/SendGridMail/SendGrid.cs @@ -23,8 +23,24 @@ namespace SendGridMail #endregion
#region Initialization and Constructors
-
- internal SendGrid(MailAddress from, MailAddress[] to, MailAddress[] cc, MailAddress[] bcc,
+
+ /// <summary>
+ /// Creates an instance of SendGrid's custom message object
+ /// </summary>
+ /// <returns></returns>
+ public SendGrid() : this(new Header())
+ {
+
+ }
+
+ public SendGrid(IHeader header)
+ {
+ _message = new MailMessage();
+ Header = header;
+ Headers = new Dictionary<string, string>();
+ }
+
+ public SendGrid(MailAddress from, MailAddress[] to, MailAddress[] cc, MailAddress[] bcc,
String subject, String html, String text, IHeader header = null) : this(header)
{
From = from;
@@ -38,23 +54,6 @@ namespace SendGridMail Html = html;
}
- internal SendGrid(IHeader header)
- {
- _message = new MailMessage();
- Header = header;
- Headers = new Dictionary<string, string>();
- }
-
- /// <summary>
- /// Creates an instance of SendGrid's custom message object
- /// </summary>
- /// <returns></returns>
- public static SendGrid GetInstance()
- {
- var header = new Header();
- return new SendGrid(header);
- }
-
/// <summary>
/// Creates an instance of SendGrid's custom message object with mail parameters
/// </summary>
|