Workperiod email cant send

Hi i have configured to send workperiod email but i am getting error cant send email exception details logged. how to solve this can any one help me please. and i have share all screen shots of my setup.







Hello @sam2

To be able to find out the reason of the issue, we need to see the Log file.

You can find the Log file in SambaPOS5 folder under the Document Folder.

indent preformatted text by 4 spaces[General Info]

Application: SambaPOS
Version: 5.2.22
Region: en
DB: SQ
Machine: DELL
User: Dell
Date: 6/26/2019
Time: 1:08 PM

User Explanation:

Dell said “”

[Exception Info 1]

Top-level Exception
Type: System.IO.FileNotFoundException
Message: Could not find file ‘C:\Report\Cash Report’.
Source: mscorlib
Stack Trace: at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.FileStream
ctor(String path, FileMode mode, FileAccess access, FileShare share)
at System.Net.Mail.AttachmentBase.SetContentFromFile(String fileName, String mediaType)
at System.Net.Mail.AttachmentBase
ctor(String fileName)
at System.Net.Mail.Attachment
ctor(String fileName)
at Samba.Services.Implementations.EMailService.<>c__DisplayClass3_0.b__3(String x) in C:\Users\vehbi\Source\Repos\sambapos-v5-pro\Samba.Services\Implementations\EMailService.cs:line 70
at System.Collections.Generic.List1.ForEach(Action1 action)
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\Source\Repos\sambapos-v5-pro\Samba.Services\Implementations\EMailService.cs:line 70
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\Source\Repos\sambapos-v5-pro\Samba.Services\Implementations\EMailService.cs:line 42


[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=1.0.0.0
System.ComponentModel.Composition, Version=4.0.0.0
System.Configuration, Version=4.0.0.0
DevExpress.Xpf.Core.v16.2, Version=16.2.13.0
System.Xaml, Version=4.0.0.0
Microsoft.Practices.Prism.MefExtensions, Version=4.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
Microsoft.Practices.Prism, Version=4.0.0.0
System.Core, Version=4.0.0.0
Samba.Infrastructure, Version=1.0.0.0
DevExpress.Data.v16.2, Version=16.2.13.0
Microsoft.Practices.ServiceLocation, Version=1.0.0.0
Samba.Localization, Version=1.0.0.0
Samba.Persistance, Version=1.0.0.0
FastButton, Version=1.0.0.0


[System Info]

Operating System
-Microsoft Windows 10 Pro
–CodeSet = 1252
–CSDVersion =
–CurrentTimeZone = 240
–FreePhysicalMemory = 2958512
–OSArchitecture = 64-bit
–OSLanguage = 1033
–ServicePackMajorVersion = 0
–ServicePackMinorVersion = 0
–Version = 10.0.17763

Machine
-DELL
–Manufacturer = Dell Inc.
–Model = Inspiron N5110
–TotalPhysicalMemory = 6345109504
–UserName = DELL\Dell


######################### E N D #########################

You are getting this error because of there is no access authorization to the Report folder.
C:\Report\Cash Report You can solve the issue by giving necessary authorizations to the folder.

It is showed how to do on the Section-5 Important Notices of related document.

i have given full permision to all

9

i have done this setup also but i got same error

You are getting this error because of there is no access authorization to the Report folder.
C:\Report\Cash Report You can solve the issue by giving necessary authorizations to the folder.

It is showed how to do on the Section-5 Important Notices of related document .

Are you generating the report first? It may not be done saving the report before you try to send it.

There is an option in the action to help it. Show the full action for the email. Your screenshot cut off some parameters at bottom.

You skipped this part

Please check the related document carefully

2.4.12.e. How to Send Reports as email At End of Work Period?

i did that also before but same error i got

hi jesse here is the screen shot for tht action and i am not generating anything just i am doing end workperiod

Hi i did it it was problem of enable pop in gmail settings anyways thank you very much v3ysell and jesse

2 Likes

hi i am able to send email from server but not from terminal when i end work period from terminal it not sending email same when i do in server i am getting email. can any one help me please.

What’s the file location for report.
You imagine it’s that directory not available to that terminal or permissions. Also same as above, the report isn’t being saved in time to the send email straight afterwards. Typically you would need to add a delay between these two thinks to allow time for report to save before sending. Especially as database grows etc

hi this is the setup i have done directory i have shared to everyone and given full permission.

But does the email action still directly follow export report in same rule?
You need to export report then use execute automation command with small delay to seccond rule to email the file to give samba time to generate and save before trying to send the file.

if it is possible can you give me some idea please

I did
 You have to seperate the two, use an execute automation command action after the report export with a command name for a new seccond rule for command name as set which then has the email action in it.

Ok so all you need to do is first make sure your files are available to that terminal computer and then in your Save Report To file action define a command name called Send Email and then set an automation command executed rule with Send Email command as custom constraint and put your send email action in that rule. Your Save Report to file action can stay in the same rule you have now.

image