Guestbook email problem

Phoca Guestbook - creating guestbooks in Joomla! CMS
CFoxall
Phoca Member
Phoca Member
Posts: 14
Joined: 10 May 2015, 11:38

Guestbook email problem

Post 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
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48386
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Guestbook email problem

Post 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
If you find Phoca extensions useful, please support the project
CFoxall
Phoca Member
Phoca Member
Posts: 14
Joined: 10 May 2015, 11:38

Re: Guestbook email problem

Post 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
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48386
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Guestbook email problem

Post by Jan »

Hi, the email ($mailFromAdmin) is the email of the user set in Options of Phoca Guestbook:

Image

Jan
If you find Phoca extensions useful, please support the project
CFoxall
Phoca Member
Phoca Member
Posts: 14
Joined: 10 May 2015, 11:38

Re: Guestbook email problem

Post 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
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48386
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Guestbook email problem

Post by Jan »

Hi, you can see the email feature here:
components\com_phocaguestbook\helpers\phocaguestbookemail.php

Jan
If you find Phoca extensions useful, please support the project
CFoxall
Phoca Member
Phoca Member
Posts: 14
Joined: 10 May 2015, 11:38

Re: Guestbook email problem

Post 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
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48386
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Guestbook email problem

Post by Jan »

Ok
If you find Phoca extensions useful, please support the project
Post Reply