Author Topic: Send Email Error  (Read 16932 times)

JohnS

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 677
Send Email Error
« on: January 10, 2012, 02:17:41 am »
Emre,

Got the following error message when trying to send an email.

We use Kerio Mail Server with a self signed SSL certificate.
Mail server is on local network.
Using my email account settings to send to my email account.
Subject - Test
Message - Test Message

Any ideas.


Also, can you describe how to use the Save Report to File Action. I keep getting invalid csv when trying to open the CSV Export with Excel.


PS - Good Morning.
SambaPOS - POS'n the World, one Terminal at a time.

jenem

  • Full Member
  • ***
  • Posts: 154
Re: Send Email Error
« Reply #1 on: January 10, 2012, 02:27:16 am »
John,

I found when creating CSV file that SambaPos would use Forward slash when creating file name. ie CSV 21/12/2010 instead of 21_12_2010. When I changed the save file name removing forward slashes the file would save and open in excel or openoffice.

Edgar

JohnS

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 677
Re: Send Email Error
« Reply #2 on: January 10, 2012, 02:40:59 am »
That was the other issue with reports I forgot about.

Thanks Edgar.
SambaPOS - POS'n the World, one Terminal at a time.

emre

  • SambaPOS Developer
  • Samba Team
  • Hero Member
  • *****
  • Posts: 1564
Re: Send Email Error
« Reply #3 on: January 12, 2012, 10:36:05 am »
John: I added "BypassSslErrors" setting to send e-mail action. I couldn't test it but it should solve your issue.
Edgar: I didn't noticed that since we do not use / as date separator so I changed the file name to a more generic format. Thank you for that.

JohnS

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 677
Re: Send Email Error
« Reply #4 on: January 15, 2012, 05:08:58 am »
Emre,

Thank you, works with my mail server now.

But wait - there's more.....

If you have DeleteFile selected, it doesn't.
If the file doesn't exist you get an error when trying to send an email.

PS - I worked out that the files are XPS files, so that's all good now.

So here is my problem. I want to email 4 reports when a Work Period Ends. But because the Rule completes faster than the files get created, I get errors sending the emails.
To get around this, I have it set to create the reports at end of Work Period, then email the files when the User logs off.

Can we combine the File Creation & Email Actions into a third Action? I assume you can only send 1 file per email?
SambaPOS - POS'n the World, one Terminal at a time.

emre

  • SambaPOS Developer
  • Samba Team
  • Hero Member
  • *****
  • Posts: 1564
Re: Send Email Error
« Reply #5 on: January 15, 2012, 05:24:29 am »
You can send multiple files by merging file names with comma (,)
For example c:\Report1.xps,c:\Report2.xps

It should wait until file creation completes but I'll test it again soon.

JohnS

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 677
Re: Send Email Error
« Reply #6 on: January 15, 2012, 06:50:55 am »
Emre,

It is working fine. I have found logging out  and back in doesn't always refresh other terminals straight away. I restarted SambaPOS and its working fine now. But definitely does not delete the files. But it does overwrite the files without any issues so far.

Also I have noticed that the Work Period does not update on networked systems unless you log off or go to maintenance. Maybe you could set an option to only End Work Period if all other workstations are logged off. Stops one department shutting down trade for entire site.

Plus, Ticket Tags are shown on the saved Work Period Report, but not if you go to reports and generate it.

Only small things :)
SambaPOS - POS'n the World, one Terminal at a time.

emre

  • SambaPOS Developer
  • Samba Team
  • Hero Member
  • *****
  • Posts: 1564
Re: Send Email Error
« Reply #7 on: January 17, 2012, 08:35:03 am »
Hello John
The ticket tags issue might be a caching issue. New created tickets might not activate until you logoff/login.

I improved ending work period procedure a little. On End work period screen we'll display active message server connections. If it is more than 1 connection a "Monitor Connections" button will appear. Clicking that button will start a timer that monitors active connection count and decrease as other terminals closes SambaPOS. That button will also broadcast a "SHUTDOWN" message. So we can capture that message with "On message received" rule and display a message (or popup) to operator. Also if you disable "Force ending work period" permission for a user he won't be able to end work period while there are active connections. You'll receive it on next release.

After sending emails we try deleting files but it seems your email software keeps an handle on these files for a while... Hmmm...