We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

How to Add Voting Buttons

Hi,
I have some code which generates mail message object. This works fine and I can send it as expected.
I am now trying to add some voting buttons to it. From reading the documentation I don’t think this is possible. Sounds very much like I’d have to create a Mapi Message.
If I create a mapi message this just creates a MSG object, can’t see any obvious way of sending it.
I’ve tried converting the mail message to mapi, then adding voting buttons and then converting back but this doesn’t work.
Any suggestions please?

Hi Andrew,


Thank you for contacting Aspose support team.

FollowUpOptions shall be used to add voting buttons to MapiMessage and then it should be converted to MailMessage setting ConvertAsTnef flag to true. Please give a try to the following sample code where MailMessage is saved along with the voting buttons. User has the option to send his vote via selecting option from the voting menu. Please give it a try and share the feedback.

MapiMessage mapi = new MapiMessage(“sender@domaincom”, “receiver@domaincom”, “Test Voting
Option”
, “Vote body”);<o:p></o:p>

FollowUpOptions options = new FollowUpOptions();

options.VotingButtons = "Yes;No;Maybe;Exactly!";

FollowUpManager.SetOptions(mapi, options);

MailMessage mail = mapi.ToMailMessage(new MailConversionOptions() { ConvertAsTnef = true });

mail.Save(@"output.msg", MsgSaveOptions.DefaultMsgUnicode);

Hi Kashif - Thanks for the great post. Problem now solved.

You are welcome.