Extra configuration now needed for Mail Sender?


  • | 473 points

    The Mail Sender feature isn't working for me in recent versions of Laragon.

    I've tested Laragon 3.1.9, 3.5 and 4.0 each with the same Gmail address and password. In each case when I use the "Test Sending Mail" button I successfully send and receive the mail.

    But when I try...

    mail('myaddress@gmail.com', 'Subject', 'Message');

    ... in v3.1.9 everything works perfectly right out of the box.

    In v3.5 I get the error: Error: mail(): Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() on line: 8

    In v4.0 I don't get an error but mail() returns false and in the Mail Sender debug log I see: Message is missing sender's address
    So it's like mail() is not using the Mail Sender.

    Is there some extra configuration I need to do in order to get Mail Sender working in v3.5 / v4.0?

    I'm using Windows 10 if that matters.


  • administrators
    | 97623 points

    @Toutouwai : I'm in holiday for 1 week. I'll check and fix it when I get back.


  • | 473 points

    Okay, thanks.


  • | 473 points

    Hi @leokhoa, have you had a chance to take a look at this yet?


  • administrators
    | 97623 points

    @Toutouwai : When I tested, it worked well in Laragon 4.0 (PHP 7.2.11). Therefore I need more information to investigate. In your php.ini, do you see this line?

    sendmail_path="C:/laragon/bin/sendmail/sendmail.exe"
    

  • | 473 points

    Thanks for checking. I think my problem must have been somehow related to an attempt to upgrade from an earlier version of Laragon. After removing all traces of Laragon and reinstalling v4.0 the mail sender is working fine for me now. Sorry for the trouble.


  • administrators
    | 97623 points

    I'm glad to hear it is working fine now. However, upgrading Laragon should not cause this issue. I'll check if there is another similar case.


Log in to reply
 

Looks like your connection to Laragon was lost, please wait while we try to reconnect.