Use a scheduled task to trigger a powershell script.
A suggestion that has been made to me is to send out a form weekly to staff asking them if they have any IT requests for the week such as booking a photographer for an event, a projector in the gym, microphones in the hall etc.
As I am inherently lazy I don't want to have to get in every Monday and send the email, I want to automate this instead BUT I don't think outlook will do this without an add on.
Can anyone suggest how I can automate this?
reggiep (3rd May 2013)
What!!!!!! hell no
Nice script! Cheers, may nab this myself!
Also worth mentioning is that if your SMTP server requires authentication and TLS (e.g. Gmail) you will need to use a slightly different Powershell script.
Code:$emailSmtpServer = "smtp.gmail.com" $emailSmtpServerPort = "587" $emailSmtpUser = "email@example.com" $emailSmtpPass = "password" $emailFrom = "Reggie <firstname.lastname@example.org>" $emailTo = "email@example.com" $emailMessage = New-Object System.Net.Mail.MailMessage($emailFrom, $emailTo) $emailMessage.Subject = "Test e-mail" $emailMessage.IsBodyHtml = $true $emailMessage.Body = @" <p>This message is <strong>HTML formatted</strong>.</p> "@ $SMTPClient = New-Object System.Net.Mail.SmtpClient($emailSmtpServer, $emailSmtpServerPort) $SMTPClient.EnableSSL = $true $SMTPClient.Credentials = New-Object System.Net.NetworkCredential($emailSmtpUser, $emailSmtpPass); $SMTPClient.Send($emailMessage)
reggiep (8th May 2013)
There are currently 1 users browsing this thread. (0 members and 1 guests)