Mailing using Codeunit 397 getting Boolean Error

company
company Member Posts: 89
Iam using Nav SP1 and Outlook 2003.

REPORT.SAVEASHTML(14005053,'d:\file2.html',TRUE,"Sales Invoice Header");
Mail.NewMessage('aaa@bbb.com',' ',' ','d:\file2.html',TRUE);
Mail.Send

Sending Mail using Mail Codeunit Iam getting error "Boolean must not be blank" "Boolean is missing or invalid in the expression"

getting in Mail code unit at MailSent := OSendMail.Send;

Wht could be the problem? :(

Comments

  • Waldo
    Waldo Member Posts: 3,412
    Try this:
    REPORT.SAVEASHTML(3,'C:\==WORKINGFOLDER\file2.html',TRUE);
    Mail.NewMessage('aaa@bbb.com',' ',' ','','C:\==WORKINGFOLDER\file2.html',FALSE);
    

    If I remember correctly, the "FALSE" should send your mail directly ...
    :-k

    Eric Wauters
    MVP - Microsoft Dynamics NAV
    My blog
  • vizaycumar
    vizaycumar Member Posts: 4
    edited 2010-10-05
    REPORT.SAVEASHTML(14005053,'d:\file2.html',FALSE,"Sales Invoice Header");
    Mail.NewMessage('aaa@bbb.com','','','','d:\file2.html',FALSE);
    Mail.Send;
    

    Iam able to send mail with this code automatically when outlook window is opened. If I haven't open my outlook the mail is not going automatically with this code, it is saving in draft of outlook. Is it necessary to open the Outlook and keeping beside navision screen?

    Onemore even Iam able to send still Iam getting message "Boolean must not be blank" and "Boolean is missing or invalid in the expression".
  • Waldo
    Waldo Member Posts: 3,412
    May be another suggestion: use SMTP-ocx on this site ...
    http://www.mibuso.com/dlinfo.asp?FileID=366

    Eric Wauters
    MVP - Microsoft Dynamics NAV
    My blog
  • kine
    kine Member Posts: 12,562
    There were some problems with the .dll in SP2 and may be that it is same in SP1. Try to use OHandler.dll from 4.00 or SP3.
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.