Page 1 of 1

Guestbook email problem

Posted: 23 Sep 2019, 16:05
by CFoxall
Phoca Guestbook 3.0.11, Joomla 3.9.11, PHP 7.2.11

Site has been using Guestbook for a number of years with no problem until change of email provider to Microsoft Exchange 365.
Mail from website is operating correctly with new email provider.
Emails sent by Guestbook fail with new provider.
Problem appears to be that the web site email is set up to send from website@..., however the Guestbook tries to send from guestbook@... which is the destination email address for the item. This was acceptable to our old email system but not tolerated by Exchange 365.
Site is currently still sending via the old email provider (the hosting company).

Also it would be nice to be able to show latest entries in a module, however this facility seems now to be only available for developers.

Colin

Re: Guestbook email problem

Posted: 25 Sep 2019, 17:11
by Jan
Hi, the email is sent by Joomla! methods, so you should check if your email setting in Joomla! Global Configuration allows to send emails from your Joomla! with new service :idea: Phoca Guestbook does not have any own solution for sending emails, it just lets Joomla! to send the emails :idea:

This module:
https://www.phoca.cz/phocaguestbook-latest-entries
is available for all who have somehow supported the project (regular translations, regular documentations, donations, developers, ...) so not only for developers.

Jan

Re: Guestbook email problem

Posted: 26 Sep 2019, 16:58
by CFoxall
All of the Joomla email functions work correctly with the new service. It is only the Guestbook which experiences a problem.
Problem appears to be that the Guestbook tries to send from guestbook@... which is the destination email address for the item. Joomla is set up to send from website@...
Carrying out debugging using Apache NetBeans in phocaguestbookemail.php, line 170 $mailFromAdmin is 'guestbook@...' as is $recipient. I would have expected $mailFromAdmin to be 'website@...' In fact injecting a value of 'website @'..." into $maiFromAdmin allows the email function to operate correctly.

Colin

Re: Guestbook email problem

Posted: 26 Sep 2019, 17:50
by Jan
Hi, the email ($mailFromAdmin) is the email of the user set in Options of Phoca Guestbook:

Image

Jan

Re: Guestbook email problem

Posted: 27 Sep 2019, 15:24
by CFoxall
Hi Jan
Thanks for the clarification. From the documentation I assumed that emails would be sent using the parameters in Joomla Global Configuration for sending and the Guestbook options as the destination. (I hadn't noticed before changing email services that emails were not from where I expected).
Just to clarify, where is $recipient obtained from and am I correct in thinking that both $mailFromAdmin and $recipient will always be the same and it isn't possible for them to be different?
Thanks
Colin

Re: Guestbook email problem

Posted: 01 Oct 2019, 13:29
by Jan
Hi, you can see the email feature here:
components\com_phocaguestbook\helpers\phocaguestbookemail.php

Jan

Re: Guestbook email problem

Posted: 01 Oct 2019, 15:00
by CFoxall
Thanks for the useful information.
I've fixed my problem by setting up delegate send on behalf of fir guestbook@... for website@...

Colin

Re: Guestbook email problem

Posted: 13 Oct 2019, 11:48
by Jan
Ok