Error when sending invoices via email

SOLVED

Hi all,

I suddenly have a problem when sending invoices via email.  This worked fine last week but now I get the message:

Error with the address xxxxxx  Unknown Error. Please check Windows Event Log for more details.

The event log says:

Error sending email using Outlook : System.IO.DirectoryNotFoundException: Path does not exist. Verify the path is correct.
at Microsoft.Office.Interop.Outlook.Attachments.Add(Object Source, Object Type, Object Position, Object DisplayName)
at Sage.Email.Outlook.OutlookMailer.SendMailInternal(Email email, SendMailOption whenToSend)
at Sage.Email.Outlook.OutlookMailer.SendMail(Email email, SendMailOption whenToSend)

I've tried various different email templates that I use and they all have the same issue.  I've not changed any email settings. 

Any help would be greatly appreciated! 

Many thanks

Paul

  • 0
    SUGGESTED

    From that error the most likely thing is that your layouts are set to include an additional attachment file but the path to that file is no longer valid i.e. has been moved, renamed or deleted. Open the layout  for editing in Report Designer and choose Email Settings from the Report menu, then click on the Email Attachments tab. From there you can see the list of files that will be added as attachments and my guess is that one or more of the files listed here do not exist. If that is the case simply select it and click remove. 

    Hope that helps

  • 0 in reply to Darron Cockram

    Hi Darron, 

    many thanks for the answer, however I dont seem to have anything in that section. 

    Its set to send the invoice as a PDF attachment.  Screenshots below show the settings. 

  • 0 in reply to nerley

    Can anyone offer assistance with this?  I have the same error if I try to send a statement so not linked specifically to the invoices.

  • +1 in reply to nerley
    verified answer

    Sorry for the radio silence but I think I may have found a possible cause of the problem and it is actually the email signature.

    Report Designer looks at the email signature you have defined in Outlook at attempts to parse any links it finds in there and adds an attachment for each one it finds. So the problem can happen if you have a link in the HTML of your Outlook signature that points not file that does not exist.

    If you edit your signature using Outlook and correct the path (or remove it if it isn't actually wanted) then that would stop the problem from happening.

    Hope that helps

  • 0 in reply to Darron Cockram

    Thanks again Darron, but it doesn't seem to have fixed it. 

    Following your message, I set the default signature to 'none' and  restarted outlook.

    Then restarted Sage. 

    But the problem is the same.

  • 0 in reply to nerley

    Looking at he code it seems that the' Active Signature' is being red from the report/layout itself rather than the Outlook setting for some reason but strangely there does not appear to be any option in the UI to view/change this. Would you be willing to share a copy of your layout please?

  • 0 in reply to Darron Cockram

    Hi Darron,  no problem to share it. 

    Although its happening across all invoices and statements so not specifically anything in this one report.

    Could you add me on here so we can share email addresses etc? 

  • 0 in reply to nerley

    Interesting that it happens with multiple layouts. Does it also happen if you use one of the built-in layouts too?

    Also I forgot to ask, what version of Accounts are you using?

    Don't think you need to be added to anything to share the file. It should just be a case of zipping up the file, clicking the Insert  menu and selecting Image/video/file. From there click the upload button and browse to the file. Then click OK and it should insert the file as an attachment to the forum message.

  • 0 in reply to Darron Cockram

    Hi Darron,  I think i've managed to fix it. I think it is something to do with the signature.  Just trying to clarify exactly whats changed then will post on here.

  • 0 in reply to nerley

    It seems what fixed this is going into Settings - EMail Defaults.  I made sure it was Overwrite Default Outook Signature  = No then applied this to all Invoices.  That seems to fix it. 

    I then went back and changed the setting to use one of the Default Signatures in Outlook, applied this to all invoices, and it stopped working again. 

    As long as its not looking for one of my signatures, I can still edit the individual email settings in Report Editor and change the text in the body of the email, and it still works. 

    Thanks a lot for the help with this, it's really appreciated. 

    Kind regards,

    Paul