I got this code to send email from a small vb program from
http://systemwebmail.com/faq/2.1.aspx
Dim mail As New MailMessage()
mail.To = "me@mycompany.com"
mail.From = "yo*@yourcompany.com"
mail.Subject = "this is a test email."
mail.Body = "this is my test email body"
SmtpMail.SmtpServer = "localhost" 'your real server goes here
SmtpMail.Send(mail)
Dead simple and works fine behind a button in visual basic 2005.
However, I want to deploy a program based on this in a school where everyone
has their own laptop with internal email running of exchange server.
The program will allow an 'emergency' button on their desktop to send an
email to reception asking for assistance.
Qn. I have to hard code my own email address in the 'From' line to make it
work from my laptop.
How can I find out the email address of a particular user so that when the
program runs on their laptop, under their login, the 'from' field can be
filled in automatically so that the email comes from the right person?
Howard