Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics NAV (Archived)

NAV send email error

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

I have configured the SMTP settings in our NAV, and confirmed they work using the test function. 

However I receive the error that states:

- The email address "" is not valid.

when I try sending an email from the Posted Sales Invoices page.

The steps I'm following are:

- Select a Posted Sales Invoice

- Click the Action Tab

- Click the email button, which brings up the Edit - Send Email

- Enter the To address, while testing I've just been sending the email to myself (which is exactly what I did when testing the SMTP settings).

- Added a short message

- unchecked Edit in Outlook (I also tested with the Edit in Outlook Checked, which worked, it brought up my Outlook account)

- Clicked Ok

At this point NAV tries to send the email but I get the error.

One thing I noticed is the from address doesn't get filled out in the pop window, since I know my to address is valid I'm think it must be related to the from address, but everywhere I've seen examples of this on the internet the from address was always blank.

Any insight on why this is happening would be greatly appreciated.

Brendon

*This post is locked for comments

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: NAV send email error

    -

  • Suggested answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: NAV send email error

    In order to resolve this issue, the email address has to be mentioned on Users form:

    Contact Email field

    Office 365 Authentication > Authentication Email

    Then you will be able to send invoices as email from Web client too.

    Regards,

    Wasiq Manzoor.

  • Verified answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: NAV send email error

    I was able to resolve this issue, it was a matter of configuring the Receive connector on our exchange server for External SMTP Relay.

    We are now able to send emails directly from NAV.

    Thanks to you all for your comments.

  • Suggested answer
    keoma Profile Picture
    keoma 32,675 on at
    RE: NAV send email error

    this could be a config issue with the used smtp server.

    maybe that helps

    stackoverflow.com/.../mailbox-unavailable-the-server-response-was-5-7-1-unable-to-relay-for-abcxyz

  • Verified answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: NAV send email error

    I have resolved the sending issue I was having. It was in fact the from address that was causing the problem. I had entered my user email in a field an email field for an add-on not the Office 365 authentication. We don't use 365 so I didn't think to use that field but that is where the email address comes from when using the email feature.

    Now I am having issues sending to accounts outside our organization.
    "The SMTP mail system returned the following error: "mailbox unavailable. The server response was 5.7.1. Unable to relay".

    Any Idea why that might be?

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: NAV send email error

    I confirmed the customer card does have the email address, as well the contact card also has the same email address.

  • Suggested answer
    Suresh Kulla Profile Picture
    Suresh Kulla 43,745 on at
    RE: NAV send email error

    Check for that invoice the Bill-to Customer No. has the Email address on the customer card.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: NAV send email error

    I ran the debugger, it is the Recipient (Sendto) address causing the error.  I can't tell why but it looks like the variable Recipients isn't getting set.  It appears as though the variable should be set in the code unit, which I can't edit.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: NAV send email error

    **EDIT - This was not causing the issue, the issue was the FROM address not being set on the user card.

    I have run the debug as Suresh Kulla suggested and it does appear to be related to the Recipient field not the and sender as I had thought.  The debugger indicated the bolded line below as the where the code stopped.

    This code is from Mail Management.

    CheckValidEmailAddresses(Recipients : Text)

     IF Recipients = '' THEN

       ERROR(InvalidEmailAddressErr,Recipients);


    It appears to me as recipients global variable isn't being set by the Sendto field.

     

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: NAV send email error

    I tried this with the other accounts including the Administrator account, all resulted in that error.  My account has the super user role as well so I don't think this would be a role issue.

    I'm thinking this has to be related to the from address, but I am not sure where I would have to set this up as NAV uses our active directory, which contain our emails.

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

Congratulations 2024 Spotlight Honorees!

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December!

Congratulations to our December super stars! 🥳

Get Started Blogging in the Community

Hosted or syndicated blogging is available! ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,371 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans