Outlook API Guide (Send e-mail with more than 260 chars)

aleix1979aleix1979 Member Posts: 213
Hi chaps!

I am looking for a guide of the Outlook Automation to see if there is any function to be able to send e-mails from Navision with more than 260 characters in the body.

I can't believe it's so restricted! :twisted:

All the stuff downloaded from MSDN is quite technical but maybe not enough.

Can anybody give a clue? :whistle:
Navision Developer

Comments

  • WaldoWaldo Member Posts: 3,412
    You can change or write your own "NewMessage" function in CU397 (Mail) for doing this. You don't need any magic for this, but yes, you'll have to write your own.

    Eric Wauters
    MVP - Microsoft Dynamics NAV
    My blog
  • amunozsuamunozsu Member Posts: 30
    You must write your own ocx with a function like this

    Public Sub AniadirLineaMensaje(linea As String)
    Cuerpo = Cuerpo + linea + vbLf + vbCr
    End Sub

    Then in the main send function write:

    ...
    MAPIMensaje.MsgNoteText = Cuerpo
    ...

    -- Alejandro --
  • aleix1979aleix1979 Member Posts: 213
    Waldo: No it cannot! the BSTR var which is the one that receives the string is actually limited to 255 chars so I can't! :(

    Alejandro: Thanks but how can I create my own OCX if it's the Microsoft's API for Outlook? :-k

    Is it possible to modify Office's DLL's :shock: :shock: :shock: ???

    All I could do is to create a wrapping that would pass to the Automation the whole text made up of lines but I would never be able to do so if the original function doesn't allow to send more than a BSTR (in other words, I need another function)

    I can't believe it's so limited... :roll: c'mon...
    Navision Developer
  • WaldoWaldo Member Posts: 3,412
    I looked a little bit closer to our solution and you're right, sorry :oops: .

    Writing a wrapper is a way to go ... or ... did you try using the smtp-ocx? There is much info about this on the forum.

    Eric Wauters
    MVP - Microsoft Dynamics NAV
    My blog
  • amunozsuamunozsu Member Posts: 30
    Your own ocx must be a wrapper of course, I have already write one some years ago, I can send it to you if you want. The inconvenient of this solution is that you must register it in each Navision client :(

    -- Alejandro --
  • aleix1979aleix1979 Member Posts: 213
    Hi alejandro.

    Yes please!!!

    I would be very grateful if you could send it to me.

    Please use my e-mail address: MyUserInMibuso and @hotmail.com

    Cheers!! \:D/
    Navision Developer
  • aleix1979aleix1979 Member Posts: 213
    Hey everyvody!

    I think I found he solution :D

    http://www.mibuso.com/dlinfo.asp?FileID=112

    In Mibuso of course :wink:

    I will report if that solves the problem 8-[
    Navision Developer
Sign In or Register to comment.