SendEmail() public method

Send the email. The email will also logged automtaically in this call (unless disabled from Umbraco)
public SendEmail ( ) : int
return int
        /// <summary>
        /// Send a test email based on the configuration of an Umbraco email node. This email is sent exclusively to the specified recipient parameter (CC and BCC are ignored)
        /// </summary>
        /// <param name="umbracoEmailNodeId">The ID of the configured Umbraco email node</param>
        /// <param name="recipients">The emailaddress to receive the test email</param>
        /// <param name="values">List of tags render in the email</param>
        /// <returns>The ID of the logged email</returns>
        public static int SendUmbracoTestEmail(int umbracoEmailNodeId, IEnumerable<MailAddress> recipients, List<EmailTag> values)
        {
            var m = new Email(umbracoEmailNodeId, values);

            m.To.Clear();
            foreach (var recipient in recipients)
                m.To.Add(recipient);
            m.CC.Clear();
            m.BCC.Clear();
            return m.SendEmail();
        }
        /// <summary>
        /// Resend any email that has previously been sent and logged. The email to resend is based on the email log ID, so only emails present in the log table can be resent.
        /// </summary>
        /// <param name="logmailID">The email log ID</param>
        /// <param name="recipientEmail">(optioneel) The alternative recipient of the email that will be resent. If left null or empty, the original recipient's emailaddress will be used</param>
        /// <param name="includeCC">Should the email also be sent to the original CC recipients?</param>
        /// <param name="includeBCC">Should the email also be sent to the original CC recipients?</param>
        /// <returns>The log ID of the email that was sent</returns>
        public static int ReSendEmail(int logmailID, string recipientEmail = null, bool includeCC = false, bool includeBCC = false)
        {
            var logMail = LogEmail.Get(logmailID);

            var m = new Email();
            m.To.Add(new MailAddress(recipientEmail ?? logMail.to));
            m.From = new MailAddress(logMail.from);
            if (!String.IsNullOrEmpty(logMail.replyTo))
                m.ReplyToList.Add(new MailAddress(logMail.replyTo));
            if (!String.IsNullOrEmpty(logMail.cc))
                m.CC.Add(new MailAddress(logMail.cc));
            if (!String.IsNullOrEmpty(logMail.bcc))
                m.BCC.Add(new MailAddress(logMail.bcc));
            if (!String.IsNullOrEmpty(logMail.host))
                m.SmtpHost = logMail.host;
            if (!String.IsNullOrEmpty(logMail.userID))
                m.SetSmtpCredentials(logMail.userID, null); // Dit is natuurlijk knudde want zonder het wachtwoord kom je niet ver
            m.Subject = logMail.subject;
            m.Body = logMail.body;
            m.EmailId = logMail.emailID;
            m.AlternativeView = logMail.alternativeView;
            if (!String.IsNullOrEmpty(logMail.attachment))
                foreach (String attachment in logMail.attachment.Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries))
                    if (!string.IsNullOrEmpty(attachment)) // redundant
                    {
                        // Is het toevallig een Umbraco Media Node Id?
                        int tmp;
                        if (attachment.All(c => Char.IsDigit(c)))
                        {
                            if (int.TryParse(attachment, out tmp))
                            {
                                // Ah, dat is makkelijk, gewoon het bestand uit Umbraco vissen
                                string filename = Helper.GetUmbracoMediaFile(tmp, true);
                                if (!String.IsNullOrEmpty(filename))
                                    m.Attachments.Add(new Attachment(filename));
                            }
                        }
                        else
                            // Fysiek pad op de schijf
                            m.Attachments.Add(new Attachment(attachment));
                    }
            return m.SendEmail();
        }