Send Mail Every Day
hi all I've exchange 2010 i want to send an automatic mail to specific address every day, how can i do that??? script rule i don't now any idea Mahmoud
May 28th, 2012 7:50am

If you want Outlook to do it (this will require your computer, and Outlook, to be running), you might try something like this http://www.mapilab.com/outlook/toolbox/email_scheduler.html Or you could use something like Blat! (which you could use on the server, so you don't need your computer running), invoked by Windows Scheduler. http://www.blat.net/Mobile OWA For Smartphone www.leederbyshire.com email a@t leederbyshire d.0.t c.0.m
Free Windows Admin Tool Kit Click here and download it now
May 28th, 2012 8:53am

hi, You can set a windows task scheduler to run the below script. You should modify the script to meet your requirement. Before you run the script you should first create a txt file, and then you should add your recipients in it. You should notice that the format is One row one recipient. Script of send a message: ---------------------------------------------------------------------------------------------------------------------------- $users= get-content <file path> foreach($user in $users){ $mail = New-Object System.Net.Mail.MailMessage $mail.From = New-Object System.Net.MailAddress("your sender's address") $address = $user $mail.To.Add("$address") $mail.Subject = "message subject" $mail.Body = "your message body" $smtp = New-Object System.Net.Mail.SmtpClient("domain01.com") $smtp.Credentials = New-Object System.Net.NetworkCredential("your sender's address", "your sender's password") $smtp.Send($mail) } ---------------------------------------------------------------------------------------------------------------------------- hope can help you thanks,CastinLu TechNet Community Support
May 29th, 2012 1:39am

thanks all castinlu, I modified in script " file path,sender's address, message subject,message body, domain01.com and sender's address", "sender's password" the following error is appears: New-Object : Cannot find type [System.Net.MailAddress]: make sure the assembly containing this type is loaded. so any idea Mahmoud
Free Windows Admin Tool Kit Click here and download it now
May 29th, 2012 4:08am

On Tue, 29 May 2012 08:08:13 +0000, HOOUDA wrote: >I modified in script " file path,sender's address, message subject,message body, domain01.com and sender's address", "sender's password" > >the following error is appears: > >New-Object : Cannot find type [System.Net.MailAddress]: make sure the assembly containing this type is loaded. > >so any idea You only need this: $mail.From = "user@domaincom" --- Rich Matheisen MCSE+I, Exchange MVP --- Rich Matheisen MCSE+I, Exchange MVP
May 29th, 2012 8:58pm

On Tue, 29 May 2012 08:08:13 +0000, HOOUDA wrote: > > >thanks all > >castinlu, > >I modified in script " file path,sender's address, message subject,message body, domain01.com and sender's address", "sender's password" > >the following error is appears: > >New-Object : Cannot find type [System.Net.MailAddress]: make sure the assembly containing this type is loaded. > >so any idea You're using Exchange 2010. Just use the Send-MailMessage cmdlet and dispense with all the .NET stuff. --- Rich Matheisen MCSE+I, Exchange MVP --- Rich Matheisen MCSE+I, Exchange MVP
Free Windows Admin Tool Kit Click here and download it now
May 29th, 2012 8:59pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics