Can I use Lotus Notes to send mail?
Solution 1
Here's an example of half-a-decade old code to send a Notes mail from Excel VBA using the Notes OLE objects - guess they can be used in most of your preferred platforms:
Dim session As Object
Dim maildb As Object
Dim maildoc As Object
Dim body As Object
Public Sub send(subject, recipient, filename)
On Error GoTo errorhandler
Const EMBED_ATTACHMENT = 1454
Call maildb.OpenMail
If Not maildb.IsOpen Then Call maildb.Open("", "")
Set maildoc = maildb.createdocument
Set body = maildoc.createrichtextitem("body")
Call maildoc.replaceitemvalue("form", "memo")
Call maildoc.replaceitemvalue("subject", subject)
Call body.EmbedObject(EMBED_ATTACHMENT, "", filename, subject)
Call maildoc.send(false,recipient)
End Sub
Private Sub Class_Initialize()
Set session = CreateObject("Notes.NotesSession")
Set maildb = session.getDatabase("", "")
End Sub
The documentation for the various Notes objects can be found here: Lotus Domino Designer documentation
Solution 2
Yes you can send email through a Lotus Notes client. I've had to do this before in a .NET application because a number of our clients were using Lotus Notes.
Lotus Notes publishes an SDK to do this.
Here's a link.
We used Interop to get the thing working. Also, be sure that you pick the correct version of the SDK. It has to match up with the version of Lotus Notes your client uses. If you use the wrong one then it won't work on their machines.
Solution 3
I have no idea about Lotus Notes. But for sending email from code i'm not sure why you need a client. In case of Exchange, you just need the server details(or any SMTP server) and then code it in the language you need. You need to go where the Lotus notes client is configured for mail accounts for finding out server details.
Solution 4
try https://rubygems.org/gems/notes_mailer (disclaimer: i'm the author)
3<
Solution 5
Here is a command line tool for sending SMTP messages. Just place the SMTP server's IP address in the config file and use command line statements to build an output file that is used for sending.
Remember: if you write code that actually uses the Notes client, the client will need to be installed everywhere this code runs.
As for the SMTP server address, I would suggest contacting anyone in your organization that deals with messaging. Sometimes companies have a separate internal SMTP server set aside for just this purpose. Otherwise, you will need to look into the Configuration \ Servers \ All Server Documents section of the Notes Directory to find the SMTP servers address.
MarkD
Updated on June 28, 2022Comments
-
MarkD almost 2 years
I have to code an app that at some point in time will have to send some reports using Lotus Notes.
My questions are :
Can I send mail through the Lotus Notes client, or something related to Lotus Notes ( a command line tool maybe? )? If so, where could I find information related to this? I would prefer not having to do it in C/C++, but if no other options' present, that would do.
How can I find out the server's address? The GUI is not intuitive, and I can't find the server address. The server's located on another computer on the network.