Can't send mail anymore after change to MAPI

Joined
Dec 14, 2005
Messages
1
Reaction score
0
I use is piece of code in a VB6 application which sends an e-mail with an attachment.
This is the code:
Code:
 Dim objOutlook As Object
 Dim objOutlookMsg As Object
 
   Set objOutlook = CreateObject("Outlook.Application")
   Set objOutlookMsg = objOutlook.CreateItem(0)
   With objOutlookMsg
    .To = sTo
    .CC = sCC
    .Subject = sSubject
    .Body = sBody
    '.HTMLBody = sBody
    If Not IsMissing(sFilePath) And Len(sFilePath) > 0 Then .Attachments.add (sFilePath)
    .Display 'Show mail
   End With
   'Cleanup:
   Set objOutlookMsg = Nothing
   Set objOutlook = Nothing


This was working fine.
Recently we changed to another mailserver. Previously we used a POP-account but now we use an IMAP-account (Kerio Mailserver). We connect using the Kerio Outlook Connector.
Since that change my code doesn't work anymore.

The message is still created. The body, subject and To are correct. Even the attachment is correct, but when I send the message (using the sendbutton on the Outlook mail window) Outlook hangs and the message isn't send.
When I 'manually' create the message with the same body, subject, To and attachment all goes well.


Can anybody help me? I'm getting realy deperate.

Thanks
Paul
The Netherlands
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top