For some reason Samba is searching for 0.txt
and the output file name is {TICKET ID}.txt
with ticket id i started in first place and then i set it as date format
[Exception Info 1]
Top-level Exception
Type: System.IO.FileNotFoundException
Message: Could not find file 'c:\tickets\0.txt'.
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.<InternalSendEmail>b__2(String x)
at System.Collections.Generic.List`1.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)
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)