It is pretty easy if you have VBA routine. Link from IBM site will give you one. And here one from my application:
Public Function SendNotesMail(strTo As String, _
strSubject As String, strBody As String, _
strFileName As String, ParamArray strFiles()) As Boolean
'Usage:
'SendNotesMail "SteveO@microsoft.com", _
"subj", "some body", "c:\filename.txt"
Dim doc As Object 'Lotus NOtes Document
Dim rtitem As Object '
Dim Body2 As Object
Dim ws As Object 'Lotus Notes Workspace
Dim oSess As Object 'Lotus Notes Session
Dim oDB As Object 'Lotus Notes Database
Dim X As Integer 'Counter
Set oSess = CreateObject("Notes.NotesSession")
'access the logged on users mailbox
Set oDB = oSess.GETDATABASE("", "")
Call oDB.OPENMAIL
'create a new document as add text
Set doc = oDB.CREATEDOCUMENT
Set rtitem = doc.CREATERICHTEXTITEM("Body")
doc.sendto = strTo
'doc.CopyTo = CCToAdr
'doc.BlindCopyTo = BCCToAdr
doc.Subject = strSubject
doc.Body = strBody & vbCrLf & vbCrLf
'attach files
If strFileName <> "" Then
Set Body2 = rtitem.EMBEDOBJECT(1454, "", strFileName)
If UBound(strFiles) > -1 Then
For X = 0 To UBound(strFiles)
Set Body2 = rtitem.EMBEDOBJECT(1454, "", strFiles(X))
Next X
End If
End If
doc.SAVEMESSAGEONSEND = True
doc.SEND False
SendNotesMail = True
End Function
hi Alex,
ReplyDeleteit seems awesome. Is there any possibikity to do the same for
Outlook.
regards,
Roopesh
Hi,
ReplyDeletethere are plenty of samples, see:
http://support.microsoft.com/kb/209948
and for advanced: http://www.outlookcode.com/
Hi Alex,
ReplyDeleteThank you very much!
I need to send 500 different emails and 500 different attachments. Is there a way to do this?
yes, you can send 500 emails using this method
ReplyDeleteGreat help to send bulk emails using Lotus Notes. It seems me the right place to share that Lotus Notes save all our data in NSF file. This NSF file sometimes gets corrupt or becomes inaccessible due to various reasons. But IBM provides no tool that helps us in recovering NSF file so we have to rely on third party nsf file recovery tools.
ReplyDeleteWhere can I use this code, sorry i am a newbie.
ReplyDeleteI've tried strings, arrays but I can't get the Public Function SendNotesMail to cc more than two people at one time. I've tried these for cc:
ReplyDeletearray("email1@some.com","email2@some.com","email3@some.com")
and
"email1@some.com","email2@some.com","email3@some.com"
Best I got are the first two get sent. What's up?
try this:
ReplyDeleteSendNotesMail("email1@some.com;email2@some.com","Subject"...
NSF Repair Kit
ReplyDeleteA must-have Lotus Notes NSF repair utility for home users and professionals dealing with NSF file corruption on a regular basis.
As it works, is described here: http://www.nsf.repair/
If it doesn't work, then look here: http://www.filerepairforum.com/forum/other/other-aa/lotus-notes/357-how-to-repair-corrupted-nsf-file-in-lotus-notes