Problems with emails in Laragon; fixed with configuration
-
raiwa
- Certified Developer
- Posts: 1640
- Joined: Sat Dec 21, 2019 8:08 am
- Phoenix Version: 1.1.0.6
- : Buy Me A Beverage
- Has thanked: 70 times
- Been thanked: 152 times
Problems with emails in Laragon; fixed with configuration
Not sure if its a 1.1.0.3 issue:
When trying to send e-mail, independent from which notify process, I get infinite loop until timeout.
PHP 8.3, unmodified Phoenix 1.1.0.3, local test installation under Laragon, E-Mail options like default installation. I
Tried also to change the E-Mail configuration settings without success.
Correct and different sendfrom and sendto e-mail addresses.
Anyone can reproduce it or is it on my side?
EDIT: Same from admin -> Tools -> Send Email (doesn't use any notify module)
When trying to send e-mail, independent from which notify process, I get infinite loop until timeout.
PHP 8.3, unmodified Phoenix 1.1.0.3, local test installation under Laragon, E-Mail options like default installation. I
Tried also to change the E-Mail configuration settings without success.
Correct and different sendfrom and sendto e-mail addresses.
Anyone can reproduce it or is it on my side?
EDIT: Same from admin -> Tools -> Send Email (doesn't use any notify module)
Public Phoenix Change Log Cheat Set on Google Sheets
https://docs.google.com/spreadsheets/d/ ... sp=sharing
Need Help?viewtopic.php?f=10&t=27
https://docs.google.com/spreadsheets/d/ ... sp=sharing
Need Help?viewtopic.php?f=10&t=27
-
heatherbell
- Senior Contributor
- Posts: 2540
- Joined: Mon Oct 07, 2019 4:39 am
- Phoenix Version:
- Has thanked: 35 times
- Been thanked: 243 times
Re: 1.1.0.3 Questions / Comments / Concerns / Feedback
Works for me on a clean test 1.1.0.3 install, sent OK and received OK (though I forgot to set Configuration>E-Mail Options>E-Mail From to valid email address the first time so it sent but was not received)
-
ecartz
- Core Team
- Posts: 3084
- Joined: Tue Nov 05, 2019 6:02 pm
- Phoenix Version:
- Has thanked: 4 times
- Been thanked: 208 times
Re: 1.1.0.3 Questions / Comments / Concerns / Feedback
Infinite loop of what? Browser redirects? Depending on what's looping, what browser you're using might make a difference.
-
raiwa
- Certified Developer
- Posts: 1640
- Joined: Sat Dec 21, 2019 8:08 am
- Phoenix Version: 1.1.0.6
- : Buy Me A Beverage
- Has thanked: 70 times
- Been thanked: 152 times
Re: 1.1.0.3 Questions / Comments / Concerns / Feedback
Tested with Firefox and Chrome.
In Admin -> Tools-> Send Email:
stays on mail.php?action=preview
In create account when submitting the form, it stays on create account instead to forward to create account success. Culprit is in:
C:\laragon\www\xxxxxxx\includes\system\versioned\1.0.8.5\email.php line 381:
When I comment out that line it works.
Didn't test yet on a server, only local Laragon.
In Admin -> Tools-> Send Email:
stays on mail.php?action=preview
In create account when submitting the form, it stays on create account instead to forward to create account success. Culprit is in:
C:\laragon\www\xxxxxxx\includes\system\versioned\1.0.8.5\email.php line 381:
Code: Select all
return mail($to, $this->ensure_encoding($subject), $this->output, implode($this->lf, $headers), "-f$from_addr");
Didn't test yet on a server, only local Laragon.
Public Phoenix Change Log Cheat Set on Google Sheets
https://docs.google.com/spreadsheets/d/ ... sp=sharing
Need Help?viewtopic.php?f=10&t=27
https://docs.google.com/spreadsheets/d/ ... sp=sharing
Need Help?viewtopic.php?f=10&t=27
-
raiwa
- Certified Developer
- Posts: 1640
- Joined: Sat Dec 21, 2019 8:08 am
- Phoenix Version: 1.1.0.6
- : Buy Me A Beverage
- Has thanked: 70 times
- Been thanked: 152 times
Re: 1.1.0.3 Questions / Comments / Concerns / Feedback
Local testinstallation or public server?heatherbell wrote: ↑Sun Jul 13, 2025 3:46 pmWorks for me on a clean test 1.1.0.3 install, sent OK and received OK (though I forgot to set Configuration>E-Mail Options>E-Mail From to valid email address the first time so it sent but was not received)
Public Phoenix Change Log Cheat Set on Google Sheets
https://docs.google.com/spreadsheets/d/ ... sp=sharing
Need Help?viewtopic.php?f=10&t=27
https://docs.google.com/spreadsheets/d/ ... sp=sharing
Need Help?viewtopic.php?f=10&t=27
-
raiwa
- Certified Developer
- Posts: 1640
- Joined: Sat Dec 21, 2019 8:08 am
- Phoenix Version: 1.1.0.6
- : Buy Me A Beverage
- Has thanked: 70 times
- Been thanked: 152 times
Re: 1.1.0.3 Questions / Comments / Concerns / Feedback
Update:
Happens also on local 1.1.0.0 but on a 1.1.0.0 Server Installation it works. So must be something on my local Testenvironment.
Would be good if someone could confirm that it works local under Laragon or Xampp.
Happens also on local 1.1.0.0 but on a 1.1.0.0 Server Installation it works. So must be something on my local Testenvironment.
Would be good if someone could confirm that it works local under Laragon or Xampp.
Public Phoenix Change Log Cheat Set on Google Sheets
https://docs.google.com/spreadsheets/d/ ... sp=sharing
Need Help?viewtopic.php?f=10&t=27
https://docs.google.com/spreadsheets/d/ ... sp=sharing
Need Help?viewtopic.php?f=10&t=27
-
ecartz
- Core Team
- Posts: 3084
- Joined: Tue Nov 05, 2019 6:02 pm
- Phoenix Version:
- Has thanked: 4 times
- Been thanked: 208 times
Re: 1.1.0.3 Questions / Comments / Concerns / Feedback
Can you surround it with a try/catch?
I wouldn't expect it to actually work on Laragon or Xampp without a lot of configuration. But mail usually does nothing rather than failing catastrophically.
I wouldn't expect it to actually work on Laragon or Xampp without a lot of configuration. But mail usually does nothing rather than failing catastrophically.
Code: Select all
set_error_handler(function($errno, $errstr, $errfile, $errline ){
throw new ErrorException($errstr, 0, $errno, $errfile, $errline);
});
try {
return mail($to, $this->ensure_encoding($subject), $this->output, implode($this->lf, $headers), "-f$from_addr");
} catch (Exception|TypeError $e) {
var_dump([$e, $to, $subject, $headers, $from_addr, $this]);
return false;
}- burt
- Core Team
- Posts: 4546
- Joined: Tue Oct 29, 2019 9:37 am
- Phoenix Version: v1.1.0.8
- : Buy Me A Beverage
- Has thanked: 252 times
- Been thanked: 412 times
Re: 1.1.0.3 Questions / Comments / Concerns / Feedback
I use Laragon. Default installation of Laragon, and default of 1103.
Admin > Tools > Send email seems to work no problem.
Using Laragons popup Email viewer thing;
Admin > Tools > Send email seems to work no problem.
Using Laragons popup Email viewer thing;
You do not have the required permissions to view the files attached to this post.
I am not here to build for you.
I am here to build with you. Let's help each other.
I am here to build with you. Let's help each other.
-
heatherbell
- Senior Contributor
- Posts: 2540
- Joined: Mon Oct 07, 2019 4:39 am
- Phoenix Version:
- Has thanked: 35 times
- Been thanked: 243 times
-
raiwa
- Certified Developer
- Posts: 1640
- Joined: Sat Dec 21, 2019 8:08 am
- Phoenix Version: 1.1.0.6
- : Buy Me A Beverage
- Has thanked: 70 times
- Been thanked: 152 times
Re: 1.1.0.3 Questions / Comments / Concerns / Feedback
Thanks all for looking into this.
I did some more tests:
It works on hosted server.
On Laragon, when I switch to PHP 8.0, the page doesn't stuck, but I do not get the popup preview like Gary.
On Laragon under PHP 8.2-8.3 the page stucks, but with Mat's debug code doesn't register any PHP error.
On Laragon PHP 8.0 and unmodified Phoenix 1.1.0.3, Matt's debug code throws:
I did some more tests:
It works on hosted server.
On Laragon, when I switch to PHP 8.0, the page doesn't stuck, but I do not get the popup preview like Gary.
On Laragon under PHP 8.2-8.3 the page stucks, but with Mat's debug code doesn't register any PHP error.
On Laragon PHP 8.0 and unmodified Phoenix 1.1.0.3, Matt's debug code throws:
Code: Select all
Fatal error: Uncaught ErrorException: Undefined array key "sendEmailToUserAction" in C:\laragon\www\PhoenixCart-1.1.0.3\includes\system\versioned\1.0.8.1\hooks.php:149 Stack trace: #0 C:\laragon\www\PhoenixCart-1.1.0.3\includes\system\versioned\1.0.8.1\hooks.php(149): email->{closure}(2, 'Undefined array...', 'C:\\laragon\\www\\...', 149) #1 C:\laragon\www\PhoenixCart-1.1.0.3\admintest\includes\actions\mail\send_email_to_user.php(54): hooks->cat('sendEmailToUser...') #2 C:\laragon\www\PhoenixCart-1.1.0.3\admintest\includes\segments\process_action.php(19): require('C:\\laragon\\www\\...') #3 C:\laragon\www\PhoenixCart-1.1.0.3\admintest\mail.php(33): require('C:\\laragon\\www\\...') #4 {main} thrown in C:\laragon\www\PhoenixCart-1.1.0.3\includes\system\versioned\1.0.8.1\hooks.php on line 149Public Phoenix Change Log Cheat Set on Google Sheets
https://docs.google.com/spreadsheets/d/ ... sp=sharing
Need Help?viewtopic.php?f=10&t=27
https://docs.google.com/spreadsheets/d/ ... sp=sharing
Need Help?viewtopic.php?f=10&t=27