I have a program in visual basic which will send email with attachment. The program can send email to external (internet) email or Internal Lotus Notes email with an attachment. however, I cannot send internal email to an exchange server with attachment. (there is a DEIVERY FAILURE email coming back to my email account and it said that the Message had "syntax that was not valid".
but I can send internal email to an exchange server without attachment. I think maybe the program of the syntex of the attached email highlighted below... Please help!!
Dim OLESess As Object
Dim OLEDB As Object
Set OLESess = CreateObject("Notes.Notessession")
Set OLEDB = OLESess.GetDatabase("", "")
On Error GoTo NotesError
Const EMBED_ATTACHMENT = 1454
' Creates a new document/message.
Dim Doc As Object
Dim NItem As Object
Set Doc = OLEDB.CreateDocument
' creates body of message and populates headers
Set NItem = Doc.CREATERICHTEXTITEM("BODY")
.Form = "Memo"
.Subject = MySubject
.SendTo = MySendTo
.CopyTo = MyCopyTo 'MyCopyTo is an array of receiver
.Body = MyBody
.postdate = Date
.SaveMessageOnSend = True
.PostedDate = Now
Call NItem.EMBEDOBJECT(1454, "", MyAttach, "Attachment") <<<<------------------