Page 1 of 1

The Plugin Scheduler Service

PostPosted: Fri Jul 03, 2015 12:26 pm
by perry
Hi,

v7.0.117

1. create new plugin as per your sample and start the Plugin Service (works, event log entries and email etc)
2. add business logic (Sales Order Entry) and remove it (so I have references added to the plugin)
3. restart the Plugin Service. This plugin will not work at all (i.e. no event log etc)
4. remove all references added in step 2 from plugin
5. restart Plugin Service. This plugin still doesn't work

Re: The Plugin Scheduler Service

PostPosted: Thu Feb 11, 2016 4:09 pm
by marcosomizu
Hi guys,

About this note:

"NOTE: Emailing using Outlook from a service is not supported by Microsoft - either make sure your system settings to send emails are not using outlook, or just remove the emailing code for this example."

Is it still the case? How can I overcome this situation if a client is using Outlook to send emails?

Cheers

Re: The Plugin Scheduler Service

PostPosted: Thu Feb 11, 2016 7:48 pm
by Mike.Sheen
marcosomizu wrote:Is it still the case? How can I overcome this situation if a client is using Outlook to send emails?


Yes, this is still the case.

Using Outlook to send emails has only one benefit: the mail is visible in the sent items for the user. Just override the system settings by the plugin doing the emailing to send direct to the SMTP server. You won't see the email in the users sent items, but it will still be sent.

In the example I provided, the code overrode the system setting to send using Outlook, and I believe as long as you have the SMTP server and port and SSL setting set in the system configuration of Jiwa, it will send using SMTP:
Code: Select all
Dim email As JiwaApplication.JiwaEmail.EmailMessage = JiwaApplication.BusinessLogicFactory.Instance.CreateBusinessLogic(Of JiwaApplication.JiwaEmail.EmailMessage)
email.SystemSettings.UseOutlookForEmail = False ' Cannot use outlook from within a Windows Service


NOTE: The user the service is logging into Jiwa as may require the SMTP username and password to be set - so set that in the Staff Maintenance form in Jiwa (eg: If your service is configured to login as "Admin", then set the SMTP username and password for the user "Admin" in Jiwa.

There is a bug (12468) which will cause emails to fail to send if the server requires authentication and the FROM address of the email does not match the staff members SMTP address - so make sure when you set the FROM address it matches the current users configured SMTP username.