How to detect the current email address????

E

Emil

Hi all,

In my application when some works are finished the program should
automatically send an email to some persons (their emails are known before).
The point is, different user can do this operation on different PCs, so I
want to get the standard email account on the PC where my application is
started from.
Using the class “MailMessage†like:
MailMessage message = new MailMessage(
"(e-mail address removed)",
"(e-mail address removed)",
"The Subject.",
"Some useless text to build the body….");
works perfect, but I don’t want to write the “from†email hard coded, I want
to get it programmatically (All users are using MS Office Outlook 2007 – if
this is important).
Another Question is: is it possible to send at once the email to many people
(how should the “to†field looks like?), or I must send it to each one
(repeating the step for each user – this works).
For any idea thanks in advance.

Best Regards,
Emil
 
C

christery

Hi all,

In my application when some works are finished the program should
automatically send an email to some persons (their emails are known before).
The point is, different user can do this operation on different PCs, so I
want to get the standard email account on the PC where my application is
started from.
Using the class "MailMessage" like:
MailMessage message = new MailMessage(
"(e-mail address removed)",
"(e-mail address removed)",
"The Subject.",
"Some useless text to build the body....");
works perfect, but I don't want to write the "from" email hard coded, I want
to get it programmatically (All users are using MS Office Outlook 2007 - if
this is important).
Another Question is: is it possible to send at once the email to many people
(how should the "to" field looks like?), or I must send it to each one
(repeating the step for each user - this works).
For any idea thanks in advance.

Best Regards,
Emil


for teh first q, sorry Im not infected at home with outlook but check
under HKEY_CURRENT_USER\Software\Microsoft\Office\Outlook for info
for the second q, (e-mail address removed);[email protected] /should/ work... but never tried
that..
//CY
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top