Email End Of Day Report?

the file is created now but it will not email the report
this error is showing up when ending work period

Look in this path for a file called log.txt.

C:\Users\[UserName]\Documents\SambaPOS4\log.txt

We might be able to see something in there that will tell us why the email send failed.

1 Like

More than likely the email action is not configured correctly or its having trouble connecting to your email. But like @QMcKay said that log will tell us.

If you follow my example exactly and you make the directory for the file first. It will work. I use this method every day. The only thing I showed different was the rule I typically use it on Work Period Close.

Whoops redundant post sorry.

-----------------------------

Can you please follow this?

That error you just showed us really only tells us you configured it wrong… the log will tell us what part is configured wrong.

EDIT: In the Send Email action Try marking the Bypass Ssl Errors as true.

User Explanation:

futurama said “”

[Exception Info 1]

Top-level Exception
Type: System.Net.Mail.SmtpException
Message: The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.5.1 Authentication Required. Learn more at
Source: System
Stack Trace: at System.Net.Mail.MailCommand.CheckResponse(SmtpStatusCode statusCode, String response)
at System.Net.Mail.MailCommand.Send(SmtpConnection conn, Byte[] command, MailAddress from, Boolean allowUnicode)
at System.Net.Mail.SmtpTransport.SendMail(MailAddress sender, MailAddressCollection recipients, String deliveryNotify, Boolean allowUnicode, SmtpFailedRecipientException& exception)
at System.Net.Mail.SmtpClient.Send(MailMessage message)
at Samba.Services.Implementations.EMailService.SendEmail(String smtpServerAddress, String smtpUser, String smtpPassword, Int32 smtpPort, String toEmailAddress, String ccEmailAddresses, String fromEmailAddress, String subject, String body, String fileName, Boolean deleteFile, Boolean bypassSslErrors)


[Assembly Info]

PresentationFramework, Version=4.0.0.0
System.Xaml, Version=4.0.0.0
Microsoft.Practices.Prism.MefExtensions, Version=4.0.0.0
mscorlib, Version=4.0.0.0
System, Version=4.0.0.0
WindowsBase, Version=4.0.0.0
System.Configuration, Version=4.0.0.0
Samba.Services, Version=1.0.0.0
Samba.Presentation.Services, Version=1.0.0.0
Samba.Presentation.Common, Version=1.0.0.0
Samba.Domain, Version=1.0.0.0
PresentationCore, Version=4.0.0.0
DevExpress.Xpf.Core.v14.1, Version=14.1.6.0
Microsoft.Practices.ServiceLocation, Version=1.0.0.0
Samba.Infrastructure, Version=1.0.0.0
Microsoft.Practices.Prism, Version=4.0.0.0
System.ComponentModel.Composition, Version=4.0.0.0
System.Core, Version=4.0.0.0
Samba.Localization, Version=1.0.0.0
FastButton, Version=1.0.0.0

Either you entered bad SMTP login/password or your port is wrong. Are you using Gmail?

yes i am using gmail i used port 587, 465. 25.

we got it to work
Thank you

@honey3d40, are you going to share the resolution so that others may benefit?

1 Like

the problem we en contoured . if using gmail IMAP must be enabled
in order for emails to be properly copied to your sent folder. We tried three different email addresses. for some reason one just would not work even with the different ports we tried. but two out of the three did work. the rule and actions used .

1 Like

If I remember right you have to login to your gmail account settings and enable POP support to get pop to work. It has been a while though because I do not use gmail I use outlook.com instead.

Hi @kendash I’m struggling now for to many hours to get this function implemented.
I would like to have work-period end and the Item Sales report emailed.

My email is working and receive the .txt file but did not manage to create and receive the .xps file.
This tutorial is a little mixed up, would be a pleasure to have this more cleared up and not so confusing.
Appreciate your help.

I agree its not a good tutorial. Its really quite simple just use the Save Report To file action to save the report to a specific location on your computer. Then use the email action and point to the location you save the file as File Name portion of the Send Email action.

You can use the Before Work Period Ended or Work Period Ended rule events to trigger this. I would probably have the report generated on the Before Work Period Ended event and then use the Work Period Ended event for the email.

I have it working, but needed to delete the Add Custom Constraint in the rule.
Further, yes simple to configure, I have added 3 emails in the email, EOD Report, Items sale & Stock Refill Report.

1 Like

Hello kendash, I have setup samba just as you pointed it out on this thread, but I notice that if I end work period (which has been setup), it drops the report to my desired location but still gives the error “could not save file to location” and doesn’t send the mail as configured.

Can you show screenshots of your setup.

1 Like

This is the error

1 Like