Send Email error

Oh, OK, looks like you have no message body.
Your [:Email] is the email body and don’t actually set any content as far as I can see.

Which of the [:Email] you are referring to to?

Well automation command will be providing neither file or email variables. They were being passed from command in save report action.
However in your save export action you also put [:Email] in the email field. There is nothing being passed in to it. I’m the rule change [:Email] to ‘Test Email Body’

Screenshot_2
Is this what you mean?

Yep, like that. Work?

Nope, still getting this error.

Exception Info 1]

Top-level Exception
Type: System.ArgumentException
Message: The parameter ‘address’ cannot be an empty string.
Parameter name: address
Source: System
Stack Trace: at System.Net.Mail.MailAddress…ctor(String address, String displayName, Encoding displayNameEncoding)
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 63
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

Have you removed, saved and readded the action after changing the action?

I had the same but found that all Email fields had to have an address in it.

Its annoying that the CC field has to be populated. although I did see an old post saying this would be changed so it wasn’t required but it’s either never been fixed or it crept back in.

I was able to overcome this problem by removing the Command Name and Command Value fields from the Save Report to File Action and instead I entered the File Name in the Send Email Action. After this change I was able to send email. I guess entered incorrect information in the Save Report File Action.

Hi JTR, how can i open the .xps file. I used pdf extension. Still could open the file mailed. Thanks for your support

Please allow me to revive this topic. After the closure of the work period, an email of EOD is sent to my inbox. This is fine but I have realized that the same report is being sent every time, take for example the report of Monday being sent every day from Monday to Friday. Have anyone gone through this and how did you solve it

Sounds like it’s more than delay required as if was just delay would expect it to be yesterday’s report where not overwritten yet.
Sounds like it’s not overwriting the file when saving report, look to include date in filename maybe.

Here is what i mean, on 27th after closing the work period, the report sent was for 25th.I concur with you JTR sometimes the system is not overwriting the file when saving while as other times it’s working ok, I tried even increasing the delay time.
How do I include the dates in the file name sir?

Allow me to revive this topic, previously JTRTech had suggested we should include the date in the filename, would like someone to illustrate that, the whole point is to delay the sending rule file the email before the report has fully saved and saving action to save reports with corresponding dates

Still on this Topic: Why is it that my system cannot send the email anymore ,
Initially, it was ending email at the work period but nowadays the email is never sent.Can someone kindly assist .
Please find my actions and rules attached below

Check your Gmail settings

Please allow me to revive this topic , i have followed this tutorial religiously and i have managed to send email to directors,but the problem is am receiving same email more than 100 times.
Work period is sent over and over again for more that 100times ,Has anyone experienced this nightmare and how did you guys resolve.On my case am being forced to restart the sambapos after closing the workperiod .
Here are my Actions and rules ,attached
Capture






Your loop os coming from the fact your save report action is triggering the rule that contains the save report action.
You have command name in save report action of send email which is the command name as the rule itself.

And the email action also has the same issue.

Delay action isn’t shown in any rule as I see it.