I have an application that will be installed on a server and it is connected to the internet. Microsoft Outlook will be installed as well. The system will handle requests from 5 different departments and each department has its own email address.
I have seen this code, Microsoft Outlook Send and Email Automation C# so i know how to send an email using Outlook, but the problem I am facing is changing the sender of the email. How do I setup the configuration of Outlook for each department that needs to send from C#? Is there a way to change the user logged in or something?
If you’re using Outlook to connect to an Exchange server, you can use the Exchange Web Services Managed API (and particularly the
EmailMessageclass) to connect directly to the Exchange server without having to worry about configuring the Outlook client on the server.