Solved

MailMessage with Voting Options

Posted on 2011-03-22
3
1,327 Views
Last Modified: 2012-06-27
Hi,

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 = "simon.price@mydomain.com"
        Dim recipient As String = "simon.price@mydomain.com"
        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
        client.Send(m)

Open in new window

0
Comment
Question by:SimonPrice33
3 Comments
 
LVL 11

Expert Comment

by:lenordiste
ID: 35188131
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:

http://www.mysite.com/votingPage.aspx?uid=xxxxxxx&option=1
http://www.mysite.com/votingPage.aspx?uid=xxxxxxx&option=2
http://www.mysite.com/votingPage.aspx?uid=xxxxxxx&option=3

make sure that you encrypt the user Id properly to prevent people from easily changing it and thus attempting to vote for other persons.
0
 
LVL 12

Accepted Solution

by:
Hairbrush earned 500 total points
ID: 35188762
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 http://msdn.microsoft.com/en-us/library/ff424466.aspx for a code sample.
0
 

Author Closing Comment

by:SimonPrice33
ID: 35189014
I thought this would be the case.....

User requirements changed at the last hour...
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now