Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics NAV (Archived)

How send a mail 1 time per day using job queue.

Posted on by Microsoft Employee

Hi Experts,

I want to know how to send a auto email 1 time per day with report using job queue in nav 2016.

Thank you

*This post is locked for comments

  • Suggested answer
    Andrey Baludin Profile Picture
    Andrey Baludin 3,941 on at
    RE: How send a mail 1 time per day using job queue.

    If you run your codeunit manually - is it sending?

    Also you forgot to set Starting time.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: How send a mail 1 time per day using job queue.

    Hi Andrey,

    my mail not sending im facing same problem again which i faced before,please see below

    screen shot.

    5807.mail.png

    Thank you

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: How send a mail 1 time per day using job queue.

    Hi Andrey,

    Thank you so much for your reply.

  • Verified answer
    Andrey Baludin Profile Picture
    Andrey Baludin 3,941 on at
    RE: How send a mail 1 time per day using job queue.

    Check your NAV instance and setup the NAS Settings tab:

    [View:https://msdn.microsoft.com/en-us/library/dd355055(v=nav.90).aspx#NASServices:750:50]

    You need to set startup codeunit = 450 and Run NAS with admin rights = true.

    Also the good idea is to use separate instance for batch jobs.

    Job queue entry card for 1 time per day run looks next way:

    1172.jobqueue.JPG

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: How send a mail 1 time per day using job queue.

    Hi Andrey ,

    i have created the codeunit and called through job queue but i dont idea about 1 time send mail per day thats what i asked.

    Thank you

  • Suggested answer
    Andrey Baludin Profile Picture
    Andrey Baludin 3,941 on at
    RE: How send a mail 1 time per day using job queue.

    It's better to use codeunit in this case.

    Create new one. In OnRun trigger create SMTPMail variable = codeunit 400.

    Then print something like that:

    SMTPMail.CreateMessage('test object','Sender Name','test@mail.com','test','some text body',FALSE);

    SMTPMail.Send;

    Create new Job Queue entry based on your codeunit. Setup it in its card like recurring job on each day with desirable time of send and with time between runs = 0. Run it.

    That's basically all.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,253 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans