Tuesday, 10 March 2020

python script to send mail using outlook 2016 with multiple attachment




 $Outlook = New-Object -ComObject Outlook.Application
 $createmail = $Outlook.CreateItem(0)
 $createmail.To =  "test@test.com"
 $createmail.Subject = "test"
 $createmail.Body = "test"
 $file = "C:\Users\raghuvel.sekar\Desktopscreenshot3.jpg"
 $file1 = "C:\Users\raghuvel.sekar\Desktop\creenshot4.jpg"
 $createmail.Attachments.Add($file)
 $createmail.Attachments.Add($file1)
 $createmail.Send()

No comments:

Post a Comment

Git

1 git add ↳ It lets you add changes from the working directory into the staging area 2 git commit ↳ It lets you save a snapshot of currently...