Hi there,
I don't know how to do this with a .bat file, but what you could also do is use Automation. You can do almost do everything in vba: compose a message, adress it, attach a file and send it. You can add all kind of options. Hereby I include code I used successfully to try if it's possible. It works with Access 97 and Notes 5.0.6a (and maybe with other combinations). If you want to know more about how to use Automation, just type in one of the keywords from the code below in a search engine on the internet, and no doubt you'll find out what you are looking. Here comes the code:
Function Create_Mail(err_subject$, err_body$)
Const ERR_MEMOFAILED = "Unable to compose new mail memo!"
Dim Ns As Object
Dim WorkSp As Object
Dim NdBase As Object
Dim doc As Object
Dim vntMailServer As Variant
Dim vntMailFile As Variant
Dim strNotesPath$, vntRetappl
Dim strdocsub$, strdocbody$
Dim newitem As Object
Dim newobject As Object
Dim sAttFile As String
On Error GoTo Err_Create_Mail
strdocsub$ = err_subject$
strdocbody$ = err_body$
'Create a reference to the externally created Notes-object
Set Ns = CreateObject("Notes.NotesSession"
'Get the Server- and the Database-ID
vntMailServer = Ns.GETENVIRONMENTSTRING("MailServer", True)
vntMailFile = Ns.GETENVIRONMENTSTRING("MailFile", True)
'Connect to the database in one of the two underlying methods
Set NdBase = Ns.GETDATABASE(CStr(vntMailServer), CStr(vntMailFile))
'Create a new document
NdBase.OPENMAIL
Set doc = NdBase.CreateDocument()
doc.SendTo = "pgransbergen@hotmail.com"
doc.Subject = "Felicitaties!"
'sAttFile = "c:\a.jpg"
'Set newobject = newitem.EMBEDOBJECT(EMBED_ATTACHMENT, "", sAttFile)
doc.Body = "Gefeliciteerd!"
doc.Form = "Memo"
doc.ExcludeFromView = "D"
doc.SaveMessageOnSend = True
doc.Send (False)
Exit_Create_Mail:
Set doc = Nothing
Set NdBase = Nothing
Set WorkSp = Nothing
Set Ns = Nothing
Exit Function
Err_Create_Mail:
On Error Resume Next
MsgBox ERR_MEMOFAILED & " " & Err.Number
Resume Exit_Create_Mail
End Function