Send end of day a report by email

Good morning all
at the end of a period, I would like the manager of a restaurant to receive the end of day report by email.
is it possible? if so, how to do it?
Thank you

Step 1 - Search the forum.

Step 2 - Give it a shot :wink:

You need to create action for creating the report, sending an email, then a rule based on the event you want (likely end of workperiod or time based), then include the report in the email. There are a lot of examples of this on the forum.

3 Likes

Hello
I followed the different steps but after the end of the period, I received the following message (screenshot)picture

what is in log.txt found in %USERPROFILE%\Documents\SambaPOS5 ?

it is in C:\Users\user-PC\Documents\SambaPOS5\log.txt

yep that’s the log file

At the end of the file you’ll see the exception information. Something like this:

27/01/2021 11:46
-----------------------------
[General Info]

Application: SambaPOS
Version:     5.3.0
Region:      en
DB:          SQ
Machine:     MUON
User:        wtb
Date:        27/01/2021
Time:        17:46

User Explanation:

wtb said ""
-----------------------------

[Exception Info 1]

Top-level Exception
Type:        System.ComponentModel.Win32Exception
Message:     The printer name is invalid
Source:      Samba.Services
Stack Trace: at Samba.Services.Implementations.PrinterModule.Tools.PrinterHelper.GetPrinter(String szPrinterName) in C:\Users\Vehbi\Documents\Source\Repos\sambapos-v5-pro\Samba.Services\Implementations\PrinterModule\Tools\PrinterHelper.cs:line 14
   at Samba.Services.Implementations.PrinterModule.Tools.LinePrinter.StartDocument() in C:\Users\Vehbi\Documents\Source\Repos\sambapos-v5-pro\Samba.Services\Implementations\PrinterModule\Tools\LinePrinter.cs:line 183
   at Samba.Services.Implementations.PrinterModule.PrintJobs.SlipPrinterJob.DoPrint(AppState appState, String[] lines) in C:\Users\Vehbi\Documents\Source\Repos\sambapos-v5-pro\Samba.Services\Implementations\PrinterModule\PrintJobs\SlipPrinterJob.cs:line 21
   at Samba.Services.Implementations.PrinterModule.PrintJobs.PrintJobCache.Print(AppState appState) in C:\Users\Vehbi\Documents\Source\Repos\sambapos-v5-pro\Samba.Services\Implementations\PrinterModule\PrintJobs\PrintJobFactory.cs:line 80
   at Samba.Services.Implementations.PrinterModule.PrintJobExecutor.InternalExecutePrintJob(AppState appState, PrintJob printJob, Int32 copies, IDictionary`2 parameters) in C:\Users\Vehbi\Documents\Source\Repos\sambapos-v5-pro\Samba.Services\Implementations\PrinterModule\PrintJobExecutor.cs:line 107
   at Samba.Services.Implementations.PrinterModule.PrintJobExecutor.<>c__DisplayClass22_0.<Execute>b__0() in C:\Users\Vehbi\Documents\Source\Repos\sambapos-v5-pro\Samba.Services\Implementations\PrinterModule\PrintJobExecutor.cs:line 90
   at Samba.Services.Implementations.PrinterModule.AsyncPrintTask.InternalExec(Action action, ILogService logService) in C:\Users\Vehbi\Documents\Source\Repos\sambapos-v5-pro\Samba.Services\Implementations\PrinterModule\AsyncPrintTask.cs:line 32

But different, of course.

post that here

28/01/2021 13:33

[General Info]

Application: SambaPOS
Version: 5.3.0
Region: fr
DB: SQ
Machine: DESKTOP-0UVJST2
User: user-PC
Date: 28/01/2021
Time: 12:33

User Explanation:

user-PC said “”

[Exception Info 1]

Top-level Exception
Type: System.ComponentModel.Win32Exception
Message: Le nom de l’imprimante n’est pas valide
Source: Samba.Services
Stack Trace: Ă  Samba.Services.Implementations.PrinterModule.Tools.PrinterHelper.GetPrinter(String szPrinterName) dans C:\Users\Vehbi\Documents\Source\Repos\sambapos-v5-pro\Samba.Services\Implementations\PrinterModule\Tools\PrinterHelper.cs:ligne 14
Ă  Samba.Services.Implementations.PrinterModule.Tools.LinePrinter.StartDocument() dans C:\Users\Vehbi\Documents\Source\Repos\sambapos-v5-pro\Samba.Services\Implementations\PrinterModule\Tools\LinePrinter.cs:ligne 183
Ă  Samba.Services.Implementations.PrinterModule.PrintJobs.SlipPrinterJob.DoPrint(AppState appState, String[] lines) dans C:\Users\Vehbi\Documents\Source\Repos\sambapos-v5-pro\Samba.Services\Implementations\PrinterModule\PrintJobs\SlipPrinterJob.cs:ligne 21
Ă  Samba.Services.Implementations.PrinterModule.PrintJobs.PrintJobCache.Print(AppState appState) dans C:\Users\Vehbi\Documents\Source\Repos\sambapos-v5-pro\Samba.Services\Implementations\PrinterModule\PrintJobs\PrintJobFactory.cs:ligne 80
Ă  Samba.Services.Implementations.PrinterModule.TicketPrinter.InternalPrint(AppState appState, Ticket ticket, PrintJob printJob, Func`2 orderSelector, Int32 copies) dans C:\Users\Vehbi\Documents\Source\Repos\sambapos-v5-pro\Samba.Services\Implementations\PrinterModule\TicketPrinter.cs:ligne 82
Ă  Samba.Services.Implementations.PrinterModule.TicketPrinter.<>c__DisplayClass17_0.b__0() dans C:\Users\Vehbi\Documents\Source\Repos\sambapos-v5-pro\Samba.Services\Implementations\PrinterModule\TicketPrinter.cs:ligne 77
Ă  Samba.Services.Implementations.PrinterModule.AsyncPrintTask.InternalExec(Action action, ILogService logService) dans C:\Users\Vehbi\Documents\Source\Repos\sambapos-v5-pro\Samba.Services\Implementations\PrinterModule\AsyncPrintTask.cs:ligne 32


[Assembly Info]

mscorlib, Version=4.0.0.0
PresentationFramework, Version=4.0.0.0
PresentationCore, Version=4.0.0.0
System, Version=4.0.0.0
WindowsBase, Version=4.0.0.0
Samba.Services, Version=5.3.7390.41537
System.ComponentModel.Composition, Version=4.0.0.0
System.Configuration, Version=4.0.0.0
DevExpress.Xpf.Core.v17.2, Version=17.2.13.0
System.Xaml, Version=4.0.0.0
Microsoft.Practices.Prism.MefExtensions, Version=4.0.0.0
Samba.Presentation.Services, Version=5.3.7390.41539
Samba.Presentation.Common, Version=5.3.7390.41541
System.Drawing, Version=4.0.0.0
Samba.Domain, Version=5.3.7390.41536
Microsoft.Practices.Prism, Version=4.0.0.0
System.Core, Version=4.0.0.0
Samba.Infrastructure, Version=5.3.7390.41533
DevExpress.Data.v17.2, Version=17.2.13.0
Microsoft.Practices.ServiceLocation, Version=1.0.0.0
Samba.Localization, Version=5.3.7390.41534
Samba.Persistance, Version=5.3.7390.41536
FastButton, Version=1.0.0.0


[System Info]

Operating System
-Microsoft Windows 10 Professionnel
–CodeSet = 1252
–CSDVersion =
–CurrentTimeZone = 60
–FreePhysicalMemory = 640484
–OSArchitecture = 64 bits
–OSLanguage = 1036
–ServicePackMajorVersion = 0
–ServicePackMinorVersion = 0
–Version = 10.0.18362

Machine
-DESKTOP-0UVJST2
–Manufacturer = Dell Inc.
–Model = Studio 1555
–TotalPhysicalMemory = 4258111488
–UserName = DESKTOP-0UVJST2\user-PC


######################### E N D #########################
28/01/2021 14:34
Manage License for :efa0cd0d-515a-4047-8d47-10c6e6e1e1e7
######################### E N D #########################
28/01/2021 14:34
License settings clearing for :efa0cd0d-515a-4047-8d47-10c6e6e1e1e7:True
######################### E N D #########################
28/01/2021 14:34
License settings cleared for :efa0cd0d-515a-4047-8d47-10c6e6e1e1e7:True
######################### E N D #########################
28/01/2021 14:34
License settings restoring for :efa0cd0d-515a-4047-8d47-10c6e6e1e1e7:True
######################### E N D #########################
28/01/2021 14:34
License settings restored for :efa0cd0d-515a-4047-8d47-10c6e6e1e1e7:True
######################### E N D #########################
28/01/2021 14:35
Manage License for :efa0cd0d-515a-4047-8d47-10c6e6e1e1e7
######################### E N D #########################
28/01/2021 14:35
License settings clearing for :efa0cd0d-515a-4047-8d47-10c6e6e1e1e7:True
######################### E N D #########################
28/01/2021 14:35
License settings cleared for :efa0cd0d-515a-4047-8d47-10c6e6e1e1e7:True
######################### E N D #########################
28/01/2021 14:35
License settings restoring for :efa0cd0d-515a-4047-8d47-10c6e6e1e1e7:True
######################### E N D #########################
28/01/2021 14:35
License settings restored for :efa0cd0d-515a-4047-8d47-10c6e6e1e1e7:True
######################### E N D #########################

That seems printer related just like my sample.

Anything in the log with System.Net.Mail.SmtpException? It would look something like this:

28/01/2021 13:49
-----------------------------
[General Info]

Application: SambaPOS
Version:     5.3.0
Region:      en
DB:          SQ
Machine:     MUON
User:        wtb
Date:        28/01/2021
Time:        19:49

User Explanation:

wtb 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.7.0 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.InternalSendEmail(String smtpUser, String smtpPassword, Int32 smtpPort, String toEmailAddress, String ccEmailAddresses, String fromEmailAddress, String subject, String body, String fileName, Boolean bypassSslErrors, MailMessage mail, SmtpClient smtpServer) in C:\Users\Vehbi\Documents\Source\Repos\sambapos-v5-pro\Samba.Services\Implementations\EMailService.cs:line 77
   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, Int32 retryCount, Int32 retryMinutes) in C:\Users\Vehbi\Documents\Source\Repos\sambapos-v5-pro\Samba.Services\Implementations\EMailService.cs:line 42

if I understand you correctly, a printer must be connected to my pc.
if so, I will do it when I am with my client. for the moment, I am working with a test version on my pc

just for my personal culture, what is the role of the terminal tab on samba post?
A brief summary will allow me to better understand its usefulness.
thank you

If you are referring to Terminals in Local Settings, you can create a new Terminal name that can later be used to assign different menus, automation commands, rules etc specifically for that terminal.

I understand you, please if you have a procedure that will allow me to better understand its operation (Terminal) it will help me.
thank you

Kb.sambapos.com has everything. Terminals allows you to assign terminal names to each terminal in a multi terminal environment.

Thanks a lot for your answers.

The printer would be a separate issue and should have no effect on sending an email.