Problem sending an automatic mail with NAS

Alisha
Member Posts: 217
Hello,
I have written a report that loads data from a file to a table, and then sends a pdf to an address (using Outlook). It works fine when I run it, but when I try to run it automatically using NAS, I get an error like "Could not create an instance of the NS Outlook Syncronization Handler..."
How can I solve this?
Thanks!
I have written a report that loads data from a file to a table, and then sends a pdf to an address (using Outlook). It works fine when I run it, but when I try to run it automatically using NAS, I get an error like "Could not create an instance of the NS Outlook Syncronization Handler..."
How can I solve this?
Thanks!
0
Comments
-
I tried to use SMTP-ocx, but the account I have need username and password, and I haven't found information about how to put an username and password with this ocx, is it possible? It would be much easier than Outlook...0
-
Hi
When you run manualy, the mail is sended automaticaly, or a new message window is opened with the pdf as attachment??
If a window is opened, there is the problem.
Bye0 -
If the outlook is open, no window pops up, but it doesn't work trough nas either. Another problem is that the email is not sent.. it remains in "Drafts".. but that's another problem..
I would really rather to use an OCX to send the email without having to use Outlook, but the only ocx I have found doesn't allow autentification, as I said above.0 -
Hi
The problem is, you can't use anything with NAS that opens any kind of Window (Dataport, Dialog,...).
Have you tried to change codeunit 397 newmessage function using MAPI (like 3.60, 3.70 versions) ??. Put OpenDialog property to FALSE
Bye0 -
Hello,
I have already do that, using the "standard" code of Navision and a NAS (i put "standard" between quote, 'cause we change the code a little as ever...)
The only one problem was to post automatically the email : we only must to let a OUTLOOK opened window under a session of an administrator user.
Maybe it can help you, I hope so0 -
Thanks for your help.. but I haven't been able to solve the problem. I have used the dll directly on my report, without making a call to the codeunit "Mail", but I obtain the same error. I have copied and registered the OLHandler.dll into the NAS folder, but still nothing..
I any of you has more ideas...0 -
Hi
Try to use MAPI in your process.
Name DataType Subtype
MAPIHandler Automation 'Navision Attain ApplicationHandler'.MAPIHandlerIF ISCLEAR(MAPIHandler) THEN CREATE(MAPIHandler); ErrorNo := 0; MAPIHandler.ToName := ToName; MAPIHandler.CCName := CCName; MAPIHandler.Subject := Subject; IF Body <> '' THEN MAPIHandler.Body := Body; MAPIHandler.AttachFileName := AttachFileName; MAPIHandler.OpenDialog := [b]FALSE[/b]; MailSent := MAPIHandler.Send; ErrorNo := MAPIHandler.ErrorStatus;
Bye0 -
That seems to work fine, but now 2 windows appear asking if I want to allow a program to send a mail trough Outlook, (that it may be a virus), and another one saying that someone tries to access the email addresses stored on Outlook. Can you prevent this popups from opening?
Thanks again, all of you are being really helpful...0 -
Hi,
I have face this problem also before...
Just for sugestion; why don't you try downloading the "Express ClickYes" installation package from http://www.ContextMagic.com
It is tiny program that runs in the system tray and automatically clicks the Yes button.
Best Regards
Joel0 -
Alisha wrote:That seems to work fine, but now 2 windows appear asking if I want to allow a program to send a mail trough Outlook, (that it may be a virus), and another one saying that someone tries to access the email addresses stored on Outlook. Can you prevent this popups from opening?
Thanks again, all of you are being really helpful...
I forgot to mentioned that is not a virus but it is a Outlook security prompt, that asks you to confirm mail sending from third party applications or access to Outlook's address book.
Best Regards
jm10 -
Hi,
OLHandler (and concequently Codeunit 397 Mail) should work fine under NAS in Navision 4.0 SP1 ("Could not create an instance of the NS Outlook Syncronization Handler..." problem should be solved there). OLHandler does not produce any security warnings while sending e-mails - try to use it.Best regards,
Dmitry0 -
Hi
If you change your default Mail client from Outlook to Oitlook express the message must disapear
Bye0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions