Beispiel #1
0
        protected void To(Name name, EmailAddress address)
        {
            var recipient = new EmailRecipient {
                Address = address,
                Name    = name,
            };

            recipient.CreateIds();

            to.Add(recipient);
        }
Beispiel #2
0
        public Email Create(string contents)
        {
            var recipient = new EmailRecipient {
                Name    = new Name("Max Froehlich"),
                Address = new EmailAddress("*****@*****.**"),
            };

            recipient.CreateIds();

            var email = new Email {
                Subject    = "smallworld Debug",
                Body       = "<pre>" + contents + "</pre>",
                Recipients = new List <EmailRecipient> {
                    recipient
                },
                Created = DateTime.UtcNow
            };

            return(email);
        }