COM 経由で Outlook を使用する場合、問題なくこれを実行できるはずです。あなたが言及した記事のサンプルを変更して、これを行う方法を示しました。
function Test()
{
Log.Message(replyToMessage2010("account name", "sender email", "Test 1234321", "This is a reply"));
}
function replyToMessage2010(accountName, senderEMail, eMailSubject, replyText)
{
var OutlookApplication = Sys.OleObject("Outlook.Application");
var NamespaceMAPI = OutlookApplication.GetNamespace("MAPI");
// Check whether the specified account exists:
if (NamespaceMAPI.Accounts.Item(accountName) != null)
{
NamespaceMAPI.SendAndReceive(false);
// Get the "Inbox" folder
var inbox = NamespaceMAPI.Folders(accountName).Folders("Inbox");
var items = inbox.Items;
for (var i = 1; i < items.Count + 1; i++)
{
if (items.Item(i).Subject == eMailSubject &&
items.Item(i).SenderEmailAddress == senderEMail && items.Item(i).UnRead)
{
var reply = items.Item(i).ReplyAll();
reply.Body = replyText + reply.Body;
reply.Send();
return true;
}
}
return false;
} else
{
OutlookApplication.Quit();
return false;
}
}