Click here to Skip to main content
15,889,335 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Dear All,

We have create Desktop application which is Microsoft office & windows interoperability. Where we created templates in Word, Powerpoint, excel & access, windows & outlook.

In templates we have PreActions & PostActions. These actions are performing well in all templates, except, outlook templates.

The outlook templates PreActions are only working, if visual studio is running. When we are publishing this on live server, but, it is not working on clients machine, where as other templates are working.

What I have tried:

For Example: Create Draft mail[PreAction]
public static bool CreateDeleteEmail(string to, string cc, string bcc, string subject, string body)
{
    using (RdoSessionWrapper rdoSession = new RdoSessionWrapper())
    {
        RDOFolder deleteFolder = rdoSession.RdoSession.GetDefaultFolder(rdoDefaultFolders.olFolderDeletedItems);
        RDOMail mailItem = deleteFolder.Items.Add();
        mailItem.SenderEmailAddress = Resources.OutlookExamEngineMapiPop3AccountName;
        mailItem.SenderEmailType = "SMTP";
        mailItem.To = to;
        mailItem.CC = cc;
        mailItem.BCC = bcc;
        mailItem.Subject = subject;
        mailItem.Body = body;
        mailItem.Importance = (int)OutlookInterop.OlImportance.olImportanceNormal;
        mailItem.UnRead = true;
        mailItem.Save();

        return true;
    }
}

The above is working, if its running locally but not on client's machine.
Can any one please help me.

Thanks in advance.
Posted
Updated 14-Feb-18 0:15am
v3
Comments
#realJSOP 14-Feb-18 5:33am    
We need more than "it's not working"...
Richard MacCutchan 14-Feb-18 6:35am    
Does the client machine have Outlook installed?
abdul subhan mohammed 14-Feb-18 6:38am    
Yes
Richard MacCutchan 14-Feb-18 6:53am    
Then you need to go to that client machine and gather some debug information. It is impossible for anyone here to guess what happens when you run your program.
abdul subhan mohammed 14-Feb-18 8:41am    
how can i debug on client's machine, the visual studio is not installed on that machine.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900