Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

sending email after windows open proplem

Status
Not open for further replies.

ahm123

Programmer
May 6, 2012
7
0
0
SA
Hi guys Can any one tell me how i make program to send email to specified email when computer open(meaning after windows open)
please help me
thanks
 
You can set up a schedule task that will kick off once a computer starts.

You can compile the following code into an exe.
Code:
     System.Net.Mail.MailMessage lmmMessage = new System.Net.Mail.MailMessage(From, To, Subject, Body);
     System.Net.Mail.SmtpClient lnmSMTP = new System.Net.Mail.SmtpClient(MailServer);
     lnmSMTP.Send(lmmMessage);

You just need to provide the, From, To, Subject, Body and MailServer data.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top