|
tech
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
default for MailMessage from propertyIs there a way of getting the default email address for the logged in user?
I am creating a MailMessage and need a valid from address in order to send an email in my app with SmtpMail.Send. James wrote:
> Is there a way of getting the default email address for the logged in user? Where do you expect to find an email address for a logged in user? Your > I am creating a MailMessage and need a valid from address in order to send > an email in my app with SmtpMail.Send. windows account doesn't contain an email address. So you're looking at the users' email program. That could be outlook (express) or any of the countless other email programs out there. So unless you demand an environment variable to be set for your program I don't see a sure fire way to get the address. Which in the end I don't regret since that makes it that much harder for emailaddress harvesting worms etc. You could always enter your own address as from, or fabricate one.. Valid only means valid format like u***@domain.com. -- Rinze van Huizen C-Services Holland b.v.
Other interesting topics
Hide JIT Debug Error
which is best? How to use .NET framework to toggle the power on a USB-powered dev ItemDataBound text modification question Several Crystal Reports Doubts GPS Facing precision issues with "double" Can't open 'Samples and Quick Start Tutorials' 2.0 Web site Administration Tool property grid control |
|||||||||||||||||||||||