Solved

MailMessage with Voting Options

Posted on 2011-03-22
3
1,389 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

Resolve Critical IT Incidents Fast

If your data, services or processes become compromised, your organization can suffer damage in just minutes and how fast you communicate during a major IT incident is everything. Learn how to immediately identify incidents & best practices to resolve them quickly and effectively.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

749 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