Link to home
Start Free TrialLog in
Avatar of vbkeco
vbkeco

asked on

Lost MAPI attachments

Hello experts,
I'm using MAPI to send e-mail with attachments on our Novell network (GroupWise E-mail).  Works fine as long as I don't send anything to the internet - the message goes thru but the attachments are lost (unless they are text files).  It seems as if a pointer is attached instead of the actual file.  Here's the code I'm using:

Private Sub cmdExit_Click()
    MAPISession1.SignOff
    End
End Sub

Private Sub cmdSend_Click()
   
    MAPIMessages1.SessionID = MAPISession1.SessionID
    MAPIMessages1.MsgIndex = -1

'    MAPIMessages1.RecipDisplayName = "PEOPLE@OURDOMAIN.OURPO"     'This works fine
    MAPIMessages1.RecipDisplayName = "gwia:" + """" + "someone@somecompany.com" + """"   'This will not keep attachments unless text
   
    MAPIMessages1.ResolveName

    MAPIMessages1.MsgSubject = "This was done with vb"
    MAPIMessages1.MsgNoteText = "This e-mail generated and sent entirely with vb....."

    MAPIMessages1.AttachmentPathName = "c:\filename.htm"
    MAPIMessages1.AttachmentName = "filename.htm"
   
    MAPIMessages1.Send
   
End Sub

Private Sub Form_Load()
    MAPISession1.UserName = "Novell Default Settings"
    MAPISession1.SignOn

End Sub

I've tried MAPIMessages1.AttachmentType = 0, 1 and 2 to no avail.  The only type of file that seems to go thru to the internet is text.  I need to send HTML attachments.  Any ideas?
Avatar of vbkeco
vbkeco

ASKER

Adjusted points to 75
ASKER CERTIFIED SOLUTION
Avatar of setiawan
setiawan

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of vbkeco

ASKER

Thanks for looking at this Danny,

I tried your proposed method and have the same result: it works within our domain, but when sent thru our exchange server, the attachment is lost unless it is a text file.  Otherwise, what appears to go thru is only a pointer to the attachment.

Within our domain, the project works perfectly.

I must also point out that MAPIMessages1.ResolveName automatically adds the SMTP prefix to .RecipAddress, so the exchange server should know which outgoing mail service to use.  Also, you are correct in that I should be assigning a position for the attachment and I've fixed my code for this.

Danny, I am increasing the points on this, and I humbly offer them to you, but I am still faced with the original problem - I lose my attachments unless they are text files.  Please think some more on this and let me know if you come up with anything else.  I'll award you the points either way for correcting my mistakes, but I could really use an answer on this one.

Respectfully,
Steve
Hi Steve,

Sorry for late reply, I think your problem is on 'attachment position'
but If It didn't solve your problem.

I think maybe you have to do some setting on your exchange, sorry I can't help you more, since I don't have Exchange Server.

I just curios, when you sending mail using MAPI, are you using Outlook Profiles or others ?

  danny
Avatar of vbkeco

ASKER

Thanks Danny,
I appreciate you looking at it just the same, and many thanks again for pointing out my other errors.  After your initial response, I changed my code to make certain that the attachment is located at the end of the message text.  Like you mentioned now, I'll probably have to change something on the exchange server - wish I knew more about this kind of thing.  It's wierd because if the attachment is a text file, it goes right on through.  Any other type gets lost.  I posted this same problem on the EE Netware forum but haven't gotten any replies as yet.  

To answer your question, the only available MAPI profile I have is "Novell Default Settings".  This consistes of 4 properties - 1) Novell Groupwise Address Book, 2) Novell Groupwise Message Store, 3) Novell Groupwise Transport, and 4) Novell Personal Address Book.  

Novell Groupwise Transport is the one that handles delivery.

Thanks again Danny!  If you happen to think of anything else I could try, I'd appreciate your input.

Best regards,
Steve