Recently, I received a query from an ADN partner, as part of partner customisation requirement expects users to send feedback about publisher app.
The idea is to trigger outlook from a .NET command which is loaded in a macro button.
We can use Microsoft.Office.Interop.Outlook API to achieve this in our command.
Use assemblyref Microsoft.Office.Interop.Outlook
static public void SMTP()
List<string> lstAllRecipients = new List<string>();
//Below is hardcoded - can be replaced with db data
Outlook.Application outlookApp =
Outlook._MailItem oMailItem =
Outlook.Inspector oInspector = oMailItem.GetInspector;
Outlook.Recipients oRecips =
foreach (String recipient in lstAllRecipients)
Outlook.Recipient oRecip =
oMailItem.Subject = "Test Mail";
oMailItem.Body = " Write your Body ";
//Display the mailbox
catch (SystemException objEx)
In the CUI macro button, pass ^C^C_SMTP