Solved

MailMessage with Voting Options

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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

832 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