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.