This script using Outlook for send the eMail.
Works perfectly.
Outlook opens a lot of warning dialogs though.
is there a way to work around them, or would I simply have to manually grant access for some time?
Hi Tobias,
My Outlook not open warning dialogs.
Active Directory: Windows Server 2003 SP2
eMail Server: Exchange Server 2007
Client: Outlook 2007 SP1
Userpermissions: Domain User
Best regards
brima
$mail = $ol.CreateItem(0) triggers first warning:
A program is trying to access e-mail addresses you have stored in Outlook. Do you want to allow this?
If this is unexpected, it may be a virus and you should choose "No".
I'm using Outlook 2003 SP2.
Ok, i have it now try on a other system with Outlook2007SP1 and a POP3 Account. Here i got also warning messages.
But in the domain environment are no warnings.
1..50 | ForEach-Object {
$ol = New-Object -comObject Outlook.Application
$mail = $ol.CreateItem(0)
$Mail.Recipients.Add("name@domain.com")
$Mail.Subject = "PS1 Script TestMail$_"
$Mail.Body = "
Test mail
"
$Mail.Send() }
but so will send 50 messages