Mail Address of Current User

  • Thread starter Thread starter Steve Hiemstra
  • Start date Start date
S

Steve Hiemstra

Hi All,

You on a workstation logged on as a specific user, and you want to use
SmtpMail
(System.Web.Mail.SmtpMail) to send an e-mail from your program.

The form of the method to send an e-mail is:

SmtpMail.Send(from, to, subject, body);

I already know who the message is going 'to', the 'subject', and the
'body'.

But I can't have the user type in their e-mail address because the app doing
all this 'behind the scenes'.

How can I get the e-mail address of the current user programmatically?

Thanks in Advance,

SteveH
 
Hi All,

How can I get the e-mail address of the current user programmatically?

Thanks in Advance,

SteveH

I wasn't aware that Windows stored the email addresses of users? I've
never told my computer my email address(es). Where do you expect a
framework method to get the email address from?

What other software does the user have? Maybe some other currently running
software tracks there email address. Maybe MS Exchange? Maybe MS
Messenger? That won't work for everyone. I have Windows XP, but I still
haven't entered an account for Messenger. I don't have a passport account
either.

If you want to get the email address from some other currently running
application, then make a reference to that application and use it's API per
that applications documentation.
 
Back
Top