I've posted this under VB and Notes, but it should work just as well here. It only calls on the mapi component that sends the mail so you don't need the proogram to open. Outlook express flashes up the sending mail dialog but doesn't open the program.
========================================
If you don't need to use Notes then you may find this useful. It works with all MAPI compliant mail programs. Just make sure your prefered mail client is set up as your default MAPI host - Outlook Express5 does it automatically.
Private Sub start_session()
MAPISession1.SignOn
MAPIMessages1.SessionID = MAPISession1.SessionID
End Sub
Private Sub end_session()
MAPISession1.SignOff
End Sub
Private Sub Command1_Click()
start_session
'Create new message
MAPIMessages1.Compose
'set the recipient info
MAPIMessages1.RecipDisplayName = SendToRealName
MAPIMessages1.RecipAddress = SendToEmailAddress
'set the subject line
MAPIMessages1.MsgSubject = Subject
'set the message
MAPIMessages1.MsgNoteText = Me.Body
'add an attatchment
MAPIMessages1.AttachmentPathName = AttatchmentFilePath
'You can add more files by repeating the statement
MAPIMessages1.Send False
end_session
End Sub
========================================