コード例 #1
0
        public void Initialize(IEmailBuilder emailBuilder, EmailBase email)
        {
            emailBuilder.SetSender(email.From);
            emailBuilder.SetContent(email.Subject, email.Content, email.ContentType);

            if (email.Headers.Count > 0)
                emailBuilder.AddToWithHeader(email.Headers);

            foreach (EmailAddress emailAddress in email.To)
            {
                emailBuilder.AddToRecipient(emailAddress);
            }
            foreach (EmailAddress emailAddress in email.Cc)
            {
                emailBuilder.AddCcRecipient(emailAddress);
            }
            foreach (EmailAddress emailAddress in email.Bcc)
            {
                emailBuilder.AddBccRecipient(emailAddress);
            }
        }
コード例 #2
0
        public void Initialize(IEmailBuilder emailBuilder, EmailBase email)
        {
            emailBuilder.SetSender(email.From);
            emailBuilder.SetContent(email.Subject, email.Content, email.ContentType);

            if (email.Headers.Count > 0)
            {
                emailBuilder.AddToWithHeader(email.Headers);
            }

            foreach (EmailAddress emailAddress in email.To)
            {
                emailBuilder.AddToRecipient(emailAddress);
            }
            foreach (EmailAddress emailAddress in email.Cc)
            {
                emailBuilder.AddCcRecipient(emailAddress);
            }
            foreach (EmailAddress emailAddress in email.Bcc)
            {
                emailBuilder.AddBccRecipient(emailAddress);
            }
        }