Community
Showing results for 
Search instead for 
Do you mean 
Reply

New babe to SDK - 2 : C# create history with attachment, attach email to contact as history

Tuned Listener
Posts: 14
Country: Australia

New babe to SDK - 2 : C# create history with attachment, attach email to contact as history

My idea is to build a internal marketing system to send emails and (mobile) SMS to clients. I am required to record them in ACT system for compliance purpose. As confidential information, we don't want to send them through the 3rd party system.

 

Basical requirements:

      1. send customized emails with some attachments(personal reports) to clients

      2. invite or advise clients via mobile SMS

      3. receive feedback message from client

 

The following code helps me record message to ACT system.

 

        static void Main(string[] args)
        {
            ActFramework actApp = new ActFramework();
            actApp.LogOn("c:/filepath/act.pad", "name", "password");

 

            Contact actContact = actApp.Contacts.GetMyRecord();

 

            Guid g = actContact.ID;            

            String hisText = "Test SDK - addattachment";

            Act.Framework.SupplementalFiles.SupplementalFileManager sf = actApp.SupplementalFileManager;             

            Act.Framework.SupplementalFiles.Attachment att = sf.CreateAttachment(AttachmentMate.History, "c:\\ComboFix.txt", "ComboFix.txt", false);                     

            actApp.Histories.CreateHistory(actContact,g, new Act.Framework.Histories.HistoryType(Act.Framework.Histories.SystemHistoryType.Attachment), false,DateTime.Now, DateTime.Now, "test History", hisText,att);

 

            String[] contactid ={ actContact.ID.ToString()};            

            Console.WriteLine(actApp.Histories.AttachEmailToContact(contactid, "c:/RE Xylem.msg", "test mail_attachment", DateTime.Now));

 

            Console.ReadLine();

        }

Employee
Posts: 1,163
Country: USA

Re: New babe to SDK - 2 : C# create history with attachment, attach email to contact as history

Hello haolle,

 

For the SMS portion you may also find this helpful : http://community.act.com/t5/Act-Developer-Downloads/SMS-Control-sample-code/td-p/72872

Matthew Wood
Act! SDK Support
Community Moderator