Sending an email with Lotus Notes using Windows Command Line

7,409

Solution 1

Sorry for my late answer.

Lotus always new message GUI if executing note.exe, so I write a VBScript to solve this problem.

set shell = CreateObject("WScript.Shell")
shell.run"YourLotusPath\notes.exe"
WScript.Sleep 1000
shell.run"YourLotusPath\notes.exe mailto:[email protected]?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 VBScript by cscript sendmail.vbs

Solution 2

This works as designed.
in browsers does the same

You could use the notes com objects if you need to send mails.

Share:
7,409

Related videos on Youtube

salman
Author by

salman

Updated on September 18, 2022

Comments

  • salman
    salman over 1 year

    I am using Lotus and wanted to send email via batch file, I tried following command.

    *D:\lotus\Notes\notes mailto:[email protected]?subject="Hello"?body="Test"*
    

    The issue is that instead of sending email, Lotus new message GUI opens.

  • Scott - Слава Україні
    Scott - Слава Україні almost 10 years
    What, exactly, is the essence of your suggestion? That the user should be in the Lotus Notes directory when he runs the notes command? That subject and body should not be quoted, even if they contain spaces? That you must include an attachment? Because I don’t see anything else that you’re doing differently from what the OP already tried.
  • umeli
    umeli almost 10 years