Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > PowerShell

Vista - How do I pass credentials for email to be sent through Exchange 2003

Reply
 
Old 09-26-2008   #1 (permalink)
TimParker


 
 

How do I pass credentials for email to be sent through Exchange 2003

I have the following code that I would like to use for emailing an
alert out. I am working on a script that will run checking a series of
directories for files older than 2 days currently. This is for our
dictation users. If there are files older than 2 days, they
potentially will have issues with Transcription in the next couple of
weeks after that. I am trying to be pro-active and find these
potential issue earlier than later.

I have ran this and I get that I am not allowed to send email through
our exchange box. Which is good, but now I can't figure out how to
pass login info through so that I can send the email.

TIA for any help.

Tim


# emailing results
$SmtpServer = "server.domain.local"
$From = "timparker@xxxxxx"
$To = "timparker@xxxxxx"
$subject = "Potential Dictation Issue"
$smtp = new-object system.net.mail.smtpClient($SmtpServer)
$mail = new-object System.Net.Mail.MailMessage
$mail.From = $From
$mail.To.Add($To)
$mail.Subject = $subject
$mail.Body = "There is a problem, send out the Transcription Police.
"
$mail.IsBodyHtml = $false
$smtp.Send($mail)

My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
How to pass credentials? PowerShell
Vista , Micorosoft exchange 2003 & Outlook 2003 Vista networking & sharing
RDP Authentication Credentials to Server 2003 Vista General
How to pass credentials to Authentication Window on the web. PowerShell
exchange 2003 and PS PowerShell


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46