コード例 #1
0
        /// <summary>
        /// Method for create the selected as a ActiveUp.Net.Mail.Message.
        /// </summary>
        /// <returns>The ActiveUp.Net.Mail.Message object.</returns>
        private ActiveUp.Net.Mail.Message CreateSelectedMessage()
        {
            ActiveUp.Net.Mail.Message message = new ActiveUp.Net.Mail.Message();
            MailMessage mailMessage           = this.rightSpine1.GetSelectedMessage();

            if (mailMessage != null)
            {
                Facade facade = Facade.GetInstance();
                ActiveUp.MailSystem.DesktopClient.AccountSettings.AccountInfo accInfo =
                    facade.GetDefaultAccountInfo();

                if (accInfo != null)
                {
                    message.From.Email = accInfo.EmailAddress;
                }

                string   separator  = ",";
                string[] recipients = mailMessage.To.Split(separator.ToCharArray());
                foreach (string r in recipients)
                {
                    // We assign the recipient email
                    message.To.Add(r);
                }

                // We assign the subject
                message.Subject = mailMessage.Subject;

                // We assign the body text
                message.BodyText.Text = this.rightSpine1.GetSelectedMessageBody();
            }
            return(message);
        }