public SmartEmail(EmailAddress[] to, EmailAddress[] cc, EmailAddress[] bcc, Attachment[] attachments, IDictionary<string, object> data, bool addRecipientsToList) { To = to; CC = cc; BCC = bcc; Attachments = attachments; Data = data; AddRecipientsToList = addRecipientsToList; }
public ClassicEmail(EmailAddress from, EmailAddress replyTo, EmailAddress[] to, EmailAddress[] cc, EmailAddress[] bcc, string subject, string html, string text, Image[] images, Attachment[] attachments, bool trackOpens, bool trackClicks, bool inlineCss, string @group, string addRecipientsToListId) { From = from; ReplyTo = replyTo; To = to; CC = cc; BCC = bcc; Subject = subject; Html = html; Text = text; Images = images; Attachments = attachments; TrackOpens = trackOpens; TrackClicks = trackClicks; InlineCss = inlineCss; Group = @group; AddRecipientsToListId = addRecipientsToListId; }
public RateLimited <RecipientStatus[]> Send(string clientId, EmailAddress from, string subject, string html, string text, ConsentToTrack consentToTrack, EmailAddress replyTo = null, EmailAddress[] cc = null, EmailAddress[] bcc = null, Image[] images = null, Attachment[] attachments = null, bool trackOpens = true, bool trackClicks = true, bool inlineCss = true, string @group = null, string addRecipientsToListId = null, params EmailAddress[] to) { if (clientId == null) { throw new ArgumentNullException("clientId"); } return(Send(new ClassicEmail(from, replyTo, to, cc, bcc, subject, html, text, images, attachments, trackOpens, trackClicks, inlineCss, @group, addRecipientsToListId, consentToTrack), this.CreateQueryString(clientId))); }
public RateLimited<RecipientStatus[]> Send(Guid smartEmailId, EmailAddress[] cc = null, EmailAddress[] bcc = null, Attachment[] attachments = null, IDictionary<string, object> data = null, bool addRecipientsToList = true, params EmailAddress[] to) { return Send(smartEmailId, new SmartEmail(to, cc, bcc, attachments, data, addRecipientsToList), new NameValueCollection()); }
public IMessageBuilder To(EmailAddress[] to) { if(to == null) throw new ArgumentNullException("to"); if(to.Length == 0) throw new ArgumentException("Cannot be empty", "to"); this.to.AddRange(to); return this; }
public IMessageBuilder To(EmailAddress to) { if(to == null) throw new ArgumentNullException("to"); this.to.Add(to); return this; }
public IMessageBuilder ReplyTo(EmailAddress replyTo) { if(replyTo == null) throw new ArgumentNullException("replyTo"); this.replyTo = replyTo; return this; }
public IMessageBuilder From(EmailAddress from) { if(from == null) throw new ArgumentNullException("from"); this.from = from; return this; }
public IMessageBuilder CC(EmailAddress[] cc) { if(cc == null) throw new ArgumentNullException("cc"); if (cc.Length == 0) throw new ArgumentException("Cannot be empty", "cc"); this.cc.AddRange(cc); return this; }
public IMessageBuilder CC(EmailAddress cc) { if(cc == null) throw new ArgumentNullException("cc"); this.cc.Add(cc); return this; }
public RateLimited <RecipientStatus[]> Send(EmailAddress from, string subject, string html, string text, EmailAddress replyTo = null, EmailAddress[] cc = null, EmailAddress[] bcc = null, Image[] images = null, Attachment[] attachments = null, bool trackOpens = true, bool trackClicks = true, bool inlineCss = true, string @group = null, string addRecipientsToListId = null, params EmailAddress[] to) { return(Send(new ClassicEmail(from, replyTo, to, cc, bcc, subject, html, text, images, attachments, trackOpens, trackClicks, inlineCss, @group, addRecipientsToListId), this.CreateQueryString())); }
public RateLimited<RecipientStatus[]> Send(string clientId, EmailAddress from, string subject, string html, string text, EmailAddress replyTo = null, EmailAddress[] cc = null, EmailAddress[] bcc = null, Image[] images = null, Attachment[] attachments = null, bool trackOpens = true, bool trackClicks = true, bool inlineCss = true, string @group = null, string addRecipientsToListId = null, params EmailAddress[] to) { if (clientId == null) throw new ArgumentNullException("clientId"); return Send(new ClassicEmail(from, replyTo, to, cc, bcc, subject, html, text, images, attachments, trackOpens, trackClicks, inlineCss, @group, addRecipientsToListId), this.CreateQueryString(clientId)); }
public static string ToString(EmailAddress email) { return email == null ? null : email.ToString(); }