How to Create & Send Email Message with Voting Options inside .NET Apps

This technical tip explains how to create & send an email message with voting options inside .NET Applications. Microsoft Outlook allows users to create a poll when composed a new message. This is done by including voting options such as Yes, No, Maybe, etc. The FollowUpOptions class offered by Aspose.Email, provides the VotingButtons property that can be used to set or get the value of the voting options. This article provides a detailed example of creating a MapiMessage with voting options for creating a poll and then sending the message using Exchange Web Service (EWS) client.
//your code here...Creating and Sending a Message with Voting Options //The following code sample shows how to create a new message and then send it with voting options. //[C#] string address = "firstname.lastname@aspose.com"; using (IEWSClient client = EWSClient.GetEWSClient("https://exchange.aspose.com/ews/Exchange.asmx", "username", "password", "aspose.com")) { MailMessage message = CreateTestMessage(address); FollowUpOptions options = new FollowUpOptions(); options.VotingButtons = "Yes;No;Maybe;Exactly!"; client.Send(message, options); } //[VB.NET] Dim address As String = "firstname.lastname@aspose.com" Using client As IEWSClient = EWSClient.GetEWSClient("https://exchange.aspose.com/ews/Exchange.asmx", "username", "password", "aspose.com") Dim message As MailMessage = CreateTestMessage(address) Dim options As New FollowUpOptions() options.VotingButtons = "Yes;No;Maybe;Exactly!" client.Send(message, options) End Using //Sample Methods Used in Examples //[C#] private static MailMessage CreateTestMessage(string address) { MailMessage eml = new MailMessage( address, address, "Flagged message", "Make it nice and short, but descriptive. The description may appear in search engines' search results pages..."); return eml; } //[VB.NET] private static MailMessage CreateTestMessage(string address) { MailMessage eml = new MailMessage( address, address, "Flagged message", "Make it nice and short, but descriptive. The description may appear in search engines' search results pages..."); return eml; }

Url: http://www.aspose.com/docs/display/emailnet/Sending+a+Message+with+Voting+Option

Language: C# | User: Sheraz Khan | Created: Jun 4, 2014 | Tags: email message with voting options, send Microsoft Outlook Programming, use Voting Buttons, Exchange Web Service client, create poll options Programming Buttons client sending EWS .NET Email API