hi all,
I am running a simple test codeunit which mails report o/p (.html file) as an attachment.
After running the codeunit, Navision gets closed.
can somebody tell me what's the problem with following codeunit ??
Anuradha
CLEAR(Mail);
IF REPORT.SAVEASHTML(5060, 'D:/Anuradha/Test report', FALSE) THEN BEGIN
MESSAGE('Successfully saved');
IF NOT Mail.NewMessage('e-mail address','','Test report','',
'D:/Anuradha/Test Report',TRUE) THEN
ERROR('Mail not sent');
END ELSE
MESSAGE('Not saved');
0
Comments
When I run the codeunit I have to replace the 'D:/Anuradha/Test report' for 'C:\test.html'
Then after changing the emailadres for a valid address it works like a charm
"Microsoft Business Solution Navision has encountered an error and needs to be closed"
getting same error for following code -
CLEAR(Mail);
REPORT.SAVEASHTML(5060, 'C:\test.html');
ToName := 'valid e-mail address';
CCName := '';
Subject := 'Test report';
Body := 'Test report';
AttachFileName := 'C:\test.html';
OpenDialog := TRUE;
Mail.NewMessage(ToName,CCName,Subject,Body,
AttachFileName,OpenDialog);
will get back after checking on another computer.
Thanks.
but i have to manually press send, mail is not going automatically...
by the way which outlook/express version is most suitable for 4.0 ??
Anuradha