I’ve been able to send emails using Lotus Notes and VBA and Python using the COM API like this:
Can I use Lotus Notes to send mail?
My question is how can I insert an image inline with the body text (not as an attachment) in a programmatic way (equivalent to the Edit | Paste Special)? I haven’t been able to find any workable solutions from a few Google searches. Any solution using stock VBA or Python would be appreciated.
Thanks!
If you don’t need to do anything specific to Notes, i.e. work with a specific form with @functions etc, then you are much better off constructing the message as a multipart mime message.
You need to set up the session so that when you create the document it is mime and you can then set up your message appropriately, see
NotesSession.ConvertMIME. You will then useNotesMIMEEntityandNotesMIMEHeaderobjects to construct the mime message.If you are unfamiliar with how mime messages are constructed then this is going to be a little tricky, so you may want to have a look at some raw mime messages to see what they look like. From there you should be able to work out how to use the api for the
NotesMIMEEntityandNotesMIMEHeaderclasses to construct the message.