Showing results for 
Search instead for 
Do you mean 

Sending E-mails though Act! using the ACT.UI.Email library

Copper Super Contributor
Posts: 52
Country: United_Kingdom

Sending E-mails though Act! using the ACT.UI.Email library

Hi everyone,


Here's a quick sample of sending a single E-mail through Act! using the available classes and methods in ACT.UI.Email.


This sample utilizes the Send method but there are other methods such as SendActivityAsEmailSendEmailSendEmailToContact and SendOpportunityAsEmail.


if ((oApp.UIEmailManager.CanEmail() == true) && (oApp.UIEmailManager.IsSystemsSetup() == true))
                //GET CONTACT VALUES
                string cEMail = oApp.ApplicationState.CurrentContact.ValidEmailAddress;
                string cFullName = oApp.ApplicationState.CurrentContact.FullName;
                string cFirstName = oApp.ApplicationState.CurrentContact.FirstName;

                DialogResult dr = MessageBox.Show("Are you sure you want to send an email to " + cFullName + " [" + cEMail + "]?", "Act!", MessageBoxButtons.YesNo,

                if (dr == DialogResult.Yes)

                    //CREATE A NEW EMAIL OBJECT
                    EmailMessage e = oApp.UIEmailManager.CreateNewEmailMessage();

                    //ADD A TO AND CC
                    e.To.Add(new EmailRecipient(cEMail));
                    e.CC.Add(new EmailRecipient(""));
                    e.BCC.Add(new EmailRecipient(""));

                    //SUBJECT LINE
                    e.Subject = "Are you living the exclamation " + cFirstName + "?";

                    e.IsHTML = true;
                    e.Message = "<HTML><BODY><SPAN style=\"font-weight:bold; font-size:16pt; color:#fd5000;\">This is a test E-mail</SPAN></BODY></HTML>";

                    //RECORD HISTORY
                    e.HistoryType = Act.Framework.Preferences.Enums.EmailCreateHistoryType.SubjectAndMessage;

                    //SEND THE EMAIL

                    //TELL THE END-USER
                    MessageBox.Show("E-mail sent to " + cFullName + " [" + cEMail + "] successfully.", "Act!", MessageBoxButtons.OK, MessageBoxIcon.Information);
                MessageBox.Show("The E-mail system is not configured. You must complete the E-mail System Setup before you can continue.", "Act", MessageBoxButtons.OK,


The code sample is also attached to this post.


Kind regards,




Copper Super Contributor
Posts: 485
Country: Australia

Re: Sending E-mails though Act! using the ACT.UI.Email library

Thanks Russell

Jason Dawson Financial Planning
Brisbane | Australia - JDFP Home Page

Act Ver - Act! Premium Version, Hot Fix 3
OS - Windows 7 (stand alone machine)
MS Office - Enterprise 2007
Phone - Samsung Galaxy s6