summaryrefslogtreecommitdiffstats
path: root/SendGrid/SendGridMail
diff options
context:
space:
mode:
Diffstat (limited to 'SendGrid/SendGridMail')
-rwxr-xr-xSendGrid/SendGridMail/SendGrid.cs9
-rwxr-xr-xSendGrid/SendGridMail/Web/IWebApi.cs45
2 files changed, 54 insertions, 0 deletions
diff --git a/SendGrid/SendGridMail/SendGrid.cs b/SendGrid/SendGridMail/SendGrid.cs
index 287c7aa..2e238f5 100755
--- a/SendGrid/SendGridMail/SendGrid.cs
+++ b/SendGrid/SendGridMail/SendGrid.cs
@@ -235,6 +235,7 @@ namespace SendGridMail
}
}
+ public Attachment[] Attachments { get; set; }
private List<Attachment> _attachments = new List<Attachment>();
public Attachment[] Attachments
{
@@ -439,6 +440,14 @@ namespace SendGridMail
}
}
+ if(Attachments != null)
+ {
+ foreach (Attachment attachment in Attachments)
+ {
+ message.Attachments.Add(attachment);
+ }
+ }
+
if (Html != null)
{
AlternateView htmlView = AlternateView.CreateAlternateViewFromString(Html, null, "text/html");
diff --git a/SendGrid/SendGridMail/Web/IWebApi.cs b/SendGrid/SendGridMail/Web/IWebApi.cs
new file mode 100755
index 0000000..52d4cb2
--- /dev/null
+++ b/SendGrid/SendGridMail/Web/IWebApi.cs
@@ -0,0 +1,45 @@
+using System;
+using System.Collections.Generic;
+
+namespace SendGridMail.Web
+{
+ interface IWebApi
+ {
+ String user { get; set; }
+ String pass { get; set; }
+
+ String GetBounces(int date, String days, DateTime start_date, DateTime end_date, int limit, int offset, int type, String email);
+ void DeleteBounces(DateTime start_date, DateTime end_date, String type, String email);
+ String GetBlocks(int days, DateTime start_date, DateTime end_date, String email);
+ void DeleteBlocks(String email);
+ String GetEmailParse(String hostname, String url);
+ void SetEmailParse(String hostname, String url);
+ void EditEmailParse(String hostname, String url);
+ void DeleteEmailParse(String hostname);
+ String GetNotificationUrl();
+ void SetNotificationUrl(String url);
+ void DeleteNotificationUrl();
+ String GetFilter();
+ void ActivateFilter(String name);
+ void DeactivateFilter(String name);
+ void SetupFilter(String user, String password, Dictionary<String, String> args);
+ String GetFilterSettings(String name);
+ void GetInvalidEmails(int date, int days, DateTime start_date, DateTime end_date, int limit, int offset, String email);
+ void DeleteInvalidEmails(DateTime start_date, DateTime end_date, String email);
+ String CountInvalidEmails(DateTime start_date, DateTime end_date);
+ String GetProfile();
+ void UpdateProfile(String First_name, String last_name, String address, String city, String state, String country, int zip, int phone, String website);
+ void SetUsername(String username);
+ void SetPassword(String password, String confpass);
+ void SetEmail(String email);
+ String GetSpamReports(int date, int days, DateTime start_date, DateTime end_date, int limit, int offset, String email);
+ void DeleteSpamReports(DateTime start_date, DateTime end_date, String email);
+ String GetStats(int days, DateTime start_date, DateTime end_date);
+ String GetAggregateStats();
+ String GetCategoryStats();
+ String GetCategoryStats(String category, int days, DateTime start_date, DateTime end_date);
+ String GetUnsubscribes(int date, int days, DateTime start_date, DateTime end_date, int limit, int offset, String email);
+ void DeleteUnsubscribes(DateTime start_date, DateTime end_date, String email);
+ void AddUnsubscribes(String email);
+ }
+}