Email approval not working

Phoca Guestbook - creating guestbooks in Joomla! CMS
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48706
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Email approval not working

Post by Jan »

Hi, which version do you use, did you set the mail in parameters component, does your mail function work on your site?

Jan
If you find Phoca extensions useful, please support the project
mkraus81
Phoca Newbie
Phoca Newbie
Posts: 7
Joined: 25 Mar 2009, 11:49

Re: Email approval not working

Post by mkraus81 »

i have the same error.
all other email-functions work, only the guestbook do not work...
i use the Phoca Guestbook 1.3.2
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48706
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Email approval not working

Post by Jan »

Hi, try to change the following code (on some servers there is a problem with e-mail name):

Line 535 +
in components\com_phocaguestbook\controllers\phocaguestbook.php
FROM:

Code: Select all

if (isset($post['email']) && $post['email'] != '') {
   $mailfrom = $post['email'];
} else {
   $mailfrom = $rows[0]->email;
} 
TO:

Code: Select all

$mailfrom = $rows[0]->email; 
Jan
If you find Phoca extensions useful, please support the project
mkraus81
Phoca Newbie
Phoca Newbie
Posts: 7
Joined: 25 Mar 2009, 11:49

Re: Email approval not working

Post by mkraus81 »

hi,

it don´t work.

i found out something...

i think the problem is here
$send_mail = 0;
if ($params->get( 'send_mail' ) != '') {
$send_mail = $params->get( 'send_mail' );
}

because the following code will not work, because $send_mail is 0
if ((int)$send_mail > 0) {
PhocaGuestbookControllerPhocaGuestbook::sendPhocaGuestbookMail((int)$send_mail, $post, $uri->toString());
}
i test it i set in the code $send_mail to the id of the user and than it works...
with the code
$send_mail = $params->get( 'send_mail' );
i always get 0

The user is selected in the phoca guestbook parameters.
Do you have an Idea?
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48706
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Email approval not working

Post by Jan »

Did you select the user in parameters component in menu link to guestbook?
If you find Phoca extensions useful, please support the project
mkraus81
Phoca Newbie
Phoca Newbie
Posts: 7
Joined: 25 Mar 2009, 11:49

Re: Email approval not working

Post by mkraus81 »

oooh thanks,

i dont know that i must select this in the menu parameters, i only selected it in the phoca guestbook parameters.
Now it works!

THANKS!!!!!
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48706
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Email approval not working

Post by Jan »

Great
If you find Phoca extensions useful, please support the project
willson
Phoca Member
Phoca Member
Posts: 36
Joined: 16 Mar 2009, 12:26

Re: Email approval not working

Post by willson »

I'm am facing the same symptom (not emailing to admin) and also did not catch the "trick" that the destination always needs to be set in the menu item (everything else has Use Globals except this). Perhaps it would be an idea to have a big notice next to the setting in the component configuration window to remind those of us who aren't so quick off the mark.

So now, in my case, send_mail=66 (that's me, user 66) in jos_component and in jos_menu item too (I checked in the db to make sure).
But, still, in phocaguestbook.php I see that $params->get( 'send_mail')=0. That is, it's returning 0 instead of 66. Something of a mystery at the moment.
Note: If I force $send_mail=66 the mail sends okay so that's good new for me - I have a workaround.

I'm going to log out, make sure my sessions expire and try again - in case it's picking up something from the sessions variables. But if anyone has any ideas I'd be happy to hear them.

Running: phocaguestbook 1.3.2, joomla 1.5.9, php 5.1.6, Apache 2.2.0
-----
Using: Restaurant Menu Pro, Gallery, Maps, Guestbook, PDF
willson
Phoca Member
Phoca Member
Posts: 36
Joined: 16 Mar 2009, 12:26

Re: Email approval not working

Post by willson »

That was it. After the change to indicate the destination in the menu item did not work at first I then logged out of everything, went for a coffee, let the sessions expire and reentered the application. In the new session phocaguestbook picked up the new destination for sending the email and everything is now working as expected.

Thank you for all your fine components.
-----
Using: Restaurant Menu Pro, Gallery, Maps, Guestbook, PDF
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48706
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Email approval not working

Post by Jan »

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