Solved

MailMessage with Voting Options

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
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 …
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

939 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

1 Experts available now in Live!

Get 1:1 Help Now