Nav And Microsoft Outlook 2007

Kc_NirvanaKc_Nirvana Member Posts: 146
Hello.
I've been searching in the forum but i didn't find what i was looking for.
I want to send a mail through NAV but that opens Outlook and create a message.
How can i do this?
I've been trying the CU 397 but it doesn't do anything
Thanks
Junior Consultant & Developer in Dynamics NAV

"I'm worse at what I do best
And for this gift I feel blessed
Our little group has always been
And always will until the end"

Nirvana - Nevermind - Smells Like Teen Spirit

Answers

  • KYDutchieKYDutchie Member Posts: 345
    Hi,

    You can send it immediately through Outlook, without opening a message in Outlook.
    To do that, you use the "New Message" Trigger and just make sure that the last parameter, "OpenDialog", is set to false.
    This way it will create the message and send it immediately.
    However, you are limited to 260 characters in the body.
    It is an easy change to expand that.

    Otherwise there is codeunit 400, SMTP mail. This codeunit uses the SMTP protocol and does not use Outlook.

    Hope this helps,

    Regards,

    Willy
    Fostering a homeless, abused child is the hardest yet most rewarding thing I have ever done.
  • Kc_NirvanaKc_Nirvana Member Posts: 146
    Thanks for the answer but that is my problem.
    I want to see the message but with true or false the outlook only opens and close, if false, or opens.
    The outlook doesn't create the message or send it automatticaly....
    Can you help?
    Junior Consultant & Developer in Dynamics NAV

    "I'm worse at what I do best
    And for this gift I feel blessed
    Our little group has always been
    And always will until the end"

    Nirvana - Nevermind - Smells Like Teen Spirit
  • KYDutchieKYDutchie Member Posts: 345
    Hi,

    I'll try and help. Have you tried to open MS Outlook prior to running your code?
    If not, try and open Outlook and see if your code creates a message.

    Does the user that you are using on the box have an Outlook account setup?
    Also, the Outlook install that you are using, is it fully registered? If not, you can only use it for about 20 times, I think.

    let me know,

    Regards,

    Willy
    Fostering a homeless, abused child is the hardest yet most rewarding thing I have ever done.
  • Kc_NirvanaKc_Nirvana Member Posts: 146
    KYDutchie wrote:
    Hi,

    I'll try and help. Have you tried to open MS Outlook prior to running your code?
    If not, try and open Outlook and see if your code creates a message.

    Does the user that you are using on the box have an Outlook account setup?
    Also, the Outlook install that you are using, is it fully registered? If not, you can only use it for about 20 times, I think.

    let me know,

    Regards,

    Willy

    I've tried with outlook open and close.
    If open and Mail.NewMessage opendialog=TRUE gives an error system and closes NAV, if opendialog=FALSE it opens and closes outlook.
    Yes it had and outlook account and it's fully registered.
    I Know that the it not pass from here
    IF (NOT OApplication.Logon(TRUE,'','',FALSE,FALSE)) THEN BEGIN
      OApplication.Logoff;
      MailSent := FALSE;
      EXIT
    END;
    
    it enters in if and do exit.
    if i comment the code enter in this if and give me an error on "ns sincronization handler"
    IF ISCLEAR(OSendMail) THEN
      CREATE(OSendMail);
    
    Can you help me?
    Junior Consultant & Developer in Dynamics NAV

    "I'm worse at what I do best
    And for this gift I feel blessed
    Our little group has always been
    And always will until the end"

    Nirvana - Nevermind - Smells Like Teen Spirit
  • KYDutchieKYDutchie Member Posts: 345
    Hi,

    This looks like a mail account error to me.
    It sounds like the automation is not able to create a message based on the user account that you are using.

    What is the error it generates?

    Willy
    Fostering a homeless, abused child is the hardest yet most rewarding thing I have ever done.
  • Kc_NirvanaKc_Nirvana Member Posts: 146
    Ns microsoft outlook sincronization handler.sendmail error....
    I solved with an automation of microsoft outlook library 12 but it preferible to use nav code units......
    Junior Consultant & Developer in Dynamics NAV

    "I'm worse at what I do best
    And for this gift I feel blessed
    Our little group has always been
    And always will until the end"

    Nirvana - Nevermind - Smells Like Teen Spirit
Sign In or Register to comment.