B4J Code Snippet Send Mail via VBScript/PowerShell from B4J via local installed Outlook 20x/365

This is a small example how to send Emails via VBScript/Powershell via Outlook (must be installed on your pc!). Works on Outlook 365, too.

The B4J App has two buttons (VBScript or PowerShell), creates the related scripts and executes them. You can add more parameters like to send attachements. See the Microsoft documentation about sending mails: MailItem

For security reasons the mails are stored as drafts via

B4X:
$email.Save()

Change it to

B4X:
$email.Send()

to send directly.
 

Attachments

  • SendMail.zip
    3.4 KB · Views: 127
Top