MailMessage with Voting Options


I have been asked to develop a series of web forms, and have also been asked for an enhancement by way of using voting options.

Can anyone advise how best to mod my code allow voting options as m.votingoptions is not a member of mailmessage
Dim m As MailMessage = New MailMessage
        Dim from As String = ""
        Dim recipient As String = ""
        Dim sbjt As String = "Test Voting"
        Dim client As SmtpClient = New SmtpClient("contef02")

        m.From = New MailAddress(from)
        m.To.Add(New MailAddress(recipient))

        m.Subject = (sbjt)
        m.Body = mailBoxMessageTxt.Text

        m.IsBodyHtml = True

Open in new window

Who is Participating?
HairbrushConnect With a Mentor Commented:
Hi Simon

I see that you are using SMTP to send your emails.  I think you might be trying to use the voting feature in Outlook.  If so, you'd need to use the Outlook object model rather than SMTP.  That would work if all your recipients are using the Outlook client.

See for a code sample.
this just cannot be done in the email you are going to send. What can be done is to provide a few URLs in your messageBody where each URL is a voting option pointing to a webform which will handle the voting logic. For instance:

make sure that you encrypt the user Id properly to prevent people from easily changing it and thus attempting to vote for other persons.
SimonPrice33Author Commented:
I thought this would be the case.....

User requirements changed at the last hour...
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.