3

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

*D:\lotus\Notes\notes mailto:abc@abc.com?subject="Hello"?body="Test"*

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

1

This works as designed.
in browsers does the same

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

1
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: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 VBScript by cscript sendmail.vbs

0

Try this e.g.:

user needs to be in Lotus Notes directory when executing command

C:\Program Files\IBM\Lotus\Notes>notes mailto:email@example.com?subject=My email^&body=some text^&attach=c:\autoexec.bat
2
  • 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. – Scott Jun 10 '14 at 13:51
  • Yes , user needs to be in Lotus Notes directory when executing command . In my example I have used ^ as escape character. Hence If you still want subject and body you'd have to escape the "&" (with ^). Else it is interpreted as a new command. I have just given an example for adding attachments as well if needed. – Harbinder Singh Jun 11 '14 at 8:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.