Hello there
I want automatic email to be sent at the end of the day.
I did the following operations.
There is an error
Have you enabled the ‘less secure’ option in your Gmail account?
Google by defult pushes for OAuth (when you get a pop-up with the Google login - which uses auth tokens over login - ie the app doesn’t store the password just notthe auth tocken) whichivh isnt suported in samba but you can allow ‘less secure’ basic user & pass authentication in settings
I can’t read that but presume that translates to allow less secure programs.
Try putting something in cc. Sure there was an issue at one point that it needed cc field value.
Also try with ssl bypass true.
evet verdim ama yinede hata veriyor
I try again the same error.
I ran the rule and I did it again
I think you need to remove the action save and re-add it is you change the action after it’s added to a rule.
action delete ok
rule delete ok
I did it again
Same mistake
With cc address?
And tries bypass ssl?
Show the log it says what’s wrong
Message: 'C:\Program Files (x86)\SambaPOS5\gunsonu' File not found
[Exception Info 1]
Top-level Exception
Type: System.IO.FileNotFoundException
Message: 'C:\Program Files (x86)\SambaPOS5\gunsonu' dosyası bulunamadı.
Source: mscorlib
Stack Trace: konum: System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
konum: 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)
konum: System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
konum: System.Net.Mail.AttachmentBase.SetContentFromFile(String fileName, String mediaType)
konum: System.Net.Mail.AttachmentBase..ctor(String fileName)
konum: System.Net.Mail.Attachment..ctor(String fileName)
konum: Samba.Services.Implementations.EMailService.<>c__DisplayClass3_0.<InternalSendEmail>b__3(String x) C:\Users\emree\Documents\Github\SambaPOSPro\Samba.Services\Implementations\EMailService.cs içinde: satır 70
konum: System.Collections.Generic.List`1.ForEach(Action`1 action)
konum: 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) C:\Users\emree\Documents\Github\SambaPOSPro\Samba.Services\Implementations\EMailService.cs içinde: satır 70
konum: 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) C:\Users\emree\Documents\Github\SambaPOSPro\Samba.Services\Implementations\EMailService.cs içinde: satır 42
There is your issue, file not found.
I’m guessing from that error that ‘dosya adi’ is attachment.
That needs to be a valid file name with directory that samba has access to. Gunsonu is neither a valid filename and has no directory.
save report to file
I did the action.
where is it saving or is it wrong? I did
No idea, but pretty sure it needs a file extention - ie .csv for one.
And pretty sure it should have a directory like C:\Reports\gunsonu.csv
This directory and filename would then also ne needed in the email action
You need to use the full path to the File for both the Save Report File Name
parameter and Send Email File Name
parameter. The CC Email Address
is also required in the Send Email Action (you can not leave it empty).
TIP: Use the forward slash (
/
) instead of the back-slash (\
) when specifying the path to the File, to avoid potential “escape character” problems.
The Save Report Action saves an XPS file, so you should use something like the following for both the Save Report File Name
parameter and the Send Email File Name
parameter:
C:/Reports/MyReport.xps