Free Support Forum - aspose.com

How to send an email with voting option?

Hi, We are using following code to test the featuer of voting options when sending email to receiver. But at receiving end, voting buttons are not visible.



MapiMessage mapi = new MapiMessage("from@domain.com", "to@domain.com", “Test Voting Option”, “Vote body”);

FollowUpOptions options = new FollowUpOptions();

options.VotingButtons = “Yes;No;Maybe;Exactly!”;



FollowUpManager.SetOptions(mapi, options);

MailMessageInterpretor mi = MailMessageInterpretorFactory.Instance.GetIntepretor(mapi.MessageClass);

MailMessage mailMsg = mi.Interpret(mapi);



SmtpClient client = smtpclient…;

client.Send(mailMsg);

Hi Aaron,


Thank you for posting your inquiry.

Please InterpretAsTnef instead of Interpret to include voting options while sending an email via SmtpClient. The following sample code shows how to achieve this. Please try it at your end and share your feedback with us.

Code:

<span style=“font-size:10.0pt;font-family:“Courier New”;mso-fareast-font-family:“Times New Roman””>MapiMessage
mapi = new MapiMessage("sender@domain.com", "receiver@gmail.com",
“Test Voting Option”, “Vote body”);<o:p></o:p>

FollowUpOptions options = new FollowUpOptions();

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

FollowUpManager.SetOptions(mapi, options);

MailMessageInterpretor mi = MailMessageInterpretorFactory.Instance.GetIntepretor(mapi.MessageClass);

MailMessage mailMsg = mi.InterpretAsTnef(mapi);

SmtpClient client = GetSmtpClient();

client.Send(mailMsg);