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

Re: Mail Address of Current User by Michael

Michael
Fri Aug 29 12:22:40 CDT 2003

"Steve Hiemstra" <SHiemstra@AnyDocSoftware.com> wrote in
news:eG8nwdkbDHA.736@TK2MSFTNGP09.phx.gbl:

> 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.

--
Michael Lang, MCSD
See my .NET open source projects
http://sourceforge.net/projects/dbobjecter (code generator)
http://sourceforge.net/projects/genadonet ("generic" ADO.NET)