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(Action
1 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
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
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
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.