Automating Email

Jelias1Jelias1 Member Posts: 35
edited 2005-03-19 in Navision Attain
I have a problem. :( I want to automate EMails during off-hours processing. Everything used to work using Navision's Mail codeunit. Until I applied some Windows security updates ... Now, Navision brings up modal windows about someone accessing my Contacts list and so on. In other words, Outlook thinks a virus is at work.

I accessed the MAPI OCX controls for Sessions and Messages directly and the app does send EMails and attachments correctly ... but I still get the same modal Outlook prompts.

Has anyone encountered this before? I know Expand-IT does it some way. However, what I'm using EMail for is notifications during off-hours EDI import.

Any assistance would be greatly appreciated. Thanks.

Comments

  • Luc_VanDyckLuc_VanDyck Member, Moderator, Administrator Posts: 3,633
    Have a look at a little program called Express ClickYes. This will automatically click the Yes button for you. This freeware tool can be downloaded from http://www.contextmagic.com/downloads.htm .

    Better option is to send your mail using smtp. You can download different smtp-mail components from this site. Using smtp, no Outlook message will pop-up.
    No support using PM or e-mail - Please use this forum. BC TechDays 2024: 13 & 14 June 2024, Antwerp (Belgium)
  • Jelias1Jelias1 Member Posts: 35
    I thought of doing this. I can do it through an outside app or automation server. The problem is, when you call SendKeys() (VB), the function sends keys to any window that has the focus. So lets say I'm sending enter keys and the user, in the middle of the process, ALT+TABs over to a window that contains a dialog that says something like

    'Are You Absolutely Sure You Want to Delete Company "My Company's Live Databse" (Yes) (No)'

    and True is the default, something really bad is going to happen.

    I do appreciate your input, though. Thanks. :D
  • Luc_VanDyckLuc_VanDyck Member, Moderator, Administrator Posts: 3,633
    Explore following links to modify your Exchange Server (you are using Exchange?) settings:

    Administrator Information About the Outlook E-mail Security Update

    Customizing the Outlook Security Features Administrative Package
    No support using PM or e-mail - Please use this forum. BC TechDays 2024: 13 & 14 June 2024, Antwerp (Belgium)
  • Jelias1Jelias1 Member Posts: 35
    Yes, we are using Exchange 2000. I'll forward this to my IT Mgr. Thanks alot. :D
  • DenSterDenSter Member Posts: 8,307
    There are some extended MAPI components that you can use, but you should also look into sending emails using an external SMTP component, so you're not depending on Microsoft products to be able to send emails. There's a product We've been looking at, check out http://www.emailarchitect.net/webapp/smtpcom/. There are also some free ones out there, but they all have either funky German error messages or no authentication. This one seems to be most complete. You just need to buy a license to be able to use it commercially.
  • Jelias1Jelias1 Member Posts: 35
    Thanks :D. I made a favorite link to that URL.

    FYI:

    I also noted that programs who do EMail w/o the Outlook warning require entry of the Exchange Server.

    I downloaded the Exchange Server SDK. There is a sample app called EmailSample.vbp (if you install the samples).
  • DenSterDenSter Member Posts: 8,307
    You cannot go around the security warnings, unless you have the ability to program with the extended MAPI, or if you have an external object that uses it. Even if you have a place to set up exchange server parameters in Navision, you will still get the security warnings if you use the MAPI or a MAPI wrapper.

    The security warning comes from MS products, and the only way to go around it is to use the standard internet mail protocol (SMTP), which is product-independent. You can program your own, or buy an external one.
  • Jelias1Jelias1 Member Posts: 35
    That worked! :D
    I found source code that uses SMTP with Winsock to establish a connection with the server. It worked perfectly! No messages.

    FYI -
    URL is http://www.planet-source-code.com/vb/sc ... 3&lngWId=1

    The name of the app is Anonymous EMail, and the version that works was written by Tom Mod.

    Thanks again.
  • kneoATworkkneoATwork Member Posts: 19
    That worked!
    I found source code that uses SMTP with Winsock to establish a connection with the server. It worked perfectly! No messages.

    How did you manage to have it working?
    Did you use the whole program or part of that?
    Please help me I have the same problem as you had. [-o<
  • Dean_AxonDean_Axon Member Posts: 193
    Sending Mail using the new version 4 dll works without any modal windows as it has been digitally signed by MS.

    I use this for sending PDF files in conjunction with Gotomaxx PDF mailer when sending statements and remittances...... Oh and any other report that you need to send

    Works a treat

    p.s. the dll file can be re-engineered to run with previous versions as I use this with 3.70 db :D
    Remember: Keep it simple
  • kneoATworkkneoATwork Member Posts: 19
    Which mail client do u use?

    We have MS Excange 2000 and when I try to send mail from Navision 4.0 it asks for permisions (with the security window).

    I have to do somthing to avoid this?

    Thanks
  • Dean_AxonDean_Axon Member Posts: 193
    MS Excange 2000

    This is your problem i'm afraid. There is an error for sites using outlook 2000 which MS are aware of and are working on a hotfix ( or so I have been assured!!)
    Remember: Keep it simple
  • UrmasUrmas Member Posts: 76
    I have written an NT service what sends (SMTP) and receives (POP3) emails from and to text files. The schedule can be set up by admin. Supports attachments.
    As it was just a helper for a bigger project, I consider it to be freeware.
    If you are intrested, send me PM.
Sign In or Register to comment.