0
私は自動的に保存されたすべての電子メールを送信しようとしていますが、これはpowershellを使用して "下書き"で利用できます.VBAが行うことができますが、PowerShellは未来です。コードを共有すると、他のピアが調整するのに役立ちます。Powershellを使って下書きから電子メールを送信するには?
私は自動的に保存されたすべての電子メールを送信しようとしていますが、これはpowershellを使用して "下書き"で利用できます.VBAが行うことができますが、PowerShellは未来です。コードを共有すると、他のピアが調整するのに役立ちます。Powershellを使って下書きから電子メールを送信するには?
#Send all items in the "Drafts" folder that have a "To" address filled in.
#Setup Outlook
Add-Type -assembly "Microsoft.Office.Interop.Outlook"
$Outlook = New-Object -comobject Outlook.Application
$myOutlook = $Outlook.Application
$myNameSpace = $myOutlook.GetNamespace("MAPI")
$myFolders = $myNameSpace.Folders
#Set Draft Folder.
$myDraftsFolder = $myFolders("[email protected]").Folders("Drafts")
#Loop through all Draft Items
$myDraftsFolder.Items|foreach-object {
#Check for "To" address and only send if "To" is filled in.
If ($_.To.trim().length -gt 0) {
#Send Item
$_.Send
}
}
この
を試してみてください