﻿using System;
using System.Runtime.InteropServices;

namespace Examples
{
    class Program
    {
        [STAThread]
        static void Main(string[] args)
        {
            RevisionManager.Application application = null;

            try
            {
                application = new RevisionManager.Application();
                application.Visible = 1;

                var bstrInputFileName = @"C:\Asm1.asm";
                string bstrInputFilePassword = null;
                string recipientAddress = null;
                var bAttachment = 1;
                string bstrPCFFilePathTobeCreated = null;
                var bRemoveGeometry = 0;
                var pcfFilePermission = default(RevisionManager.PCFFilePermissions);
                string bstrPCFFilePassword = null;
                string bstrSubject = null;
                string bstrMessageBody = null;

                application.SendMailToRecipient(
                    bstrInputFileName,
                    bstrInputFilePassword,
                    recipientAddress,
                    bAttachment,
                    bstrPCFFilePathTobeCreated,
                    bRemoveGeometry,
                    pcfFilePermission,
                    bstrPCFFilePassword,
                    bstrSubject,
                    bstrMessageBody);

            }
            catch (System.Exception ex)
            {
                Console.WriteLine(ex);
            }
        }
    }
}