Пример #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Email"/> class
        /// </summary>
        /// <param name="client">The engine</param>
        public Email(MailClient client)
        {
            this.BodyEncoding    = Encoding.UTF8;
            this.IsBodyHtml      = true;
            this.MailClient      = client;
            this.SubjectEncoding = Encoding.UTF8;

            this.From = new MailAddress(client.FromEmail, client.FromName);
        }
Пример #2
0
        /// <summary>
        /// Create new email
        /// </summary>
        /// <param name="client">The engine</param>
        public static Email Create(MailClient client = null)
        {
            if (client == null)
            {
                client = MailClient.Default;
            }

            var mail = new Email(client);

            return(mail);
        }