Sending emails with lotus notes using windows command line

0

According to sending an email with lotus notes using windows command line

Run the command notes.exe mailto:username@abcabc.com?subject="Test"?body="Test" in cmd, always open GUI instead of sending email immediately, how to send email in command line without clicking "send" button ?

Corey

Posted 2018-05-08T08:58:13.923

Reputation: 143

Answers

1

Reference: Sendkeys from command prompt

Solve this question: send lotus email with command and do not need to click any button.

Write a vbs script:

set shell = CreateObject("WScript.Shell")
shell.run"YourLotusPath\notes.exe"
WScript.Sleep 1000
shell.run"YourLotusPath\notes.exe mailto:username@abc.com?subject=Test?body=Test?attach=test.txt"
WScript.Sleep 2000
shell.SendKeys"{TAB}"
shell.SendKeys"{ENTER}"
shell.SendKeys"^(+{ENTER})"  <== Ctrl+Shift+Enter, which is lotus "send" shortcut key.
WScript.Sleep 1000
shell.SendKeys"{ENTER}"

Then, just execute the vbs script by cscript sendmail.vbs

Corey

Posted 2018-05-08T08:58:13.923

Reputation: 143