Sending email from one local email account to another on Thu

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Sending email from one local email account to another on Thu

Postby fnpb93 » 25. August 2022 14:24

Currently trying to do the following but was unable to do so:

Set up 2 accounts on Mercury using XAMPP.
Install Thunderbird and add both accounts as POP3 accounts.
Sending using the Thunderbird client from one user to another works fine.
However, using testsend.php does not work for me and produces an error:
Warning: mail(): SMTP server response: 553 We do not relay non-local mail, sorry. in C:\xampp\htdocs\email\testsend.php on line 17

testsend.php

Code: Select all
<!DOCTYPE html>
<html>

<body>
    <h1>Hello mail</h1>
    <p>My first m</p>
    <?php

    $to      = 'user@local';
    $subject = 'Email';
    $message = 'Test';

    $headers = 'From: userb@local' . "\r\n" .
        'Reply-To: userb@local' . "\r\n" .
        'X-Mailer: PHP/' . phpversion();

    mail($to, $subject, $message, $headers, '-user@localhost');
    echo 'sent successfully!';


    ?>

</body>

</html>


I've received the warning, and after some googling, I did this:
Image

Unticking the box.

Afterward, I reran the file; there were no warnings or errors this time. However, no emails appeared in my Thunderbird client for both users.

Any possible solutions to this? Thank you!
fnpb93
 
Posts: 1
Joined: 25. August 2022 14:18
XAMPP version: 7.4.29
Operating System: Windows 10

Re: Sending email from one local email account to another on

Postby FKlusmann » 22. September 2022 00:45

Hi, @fnpb93
If you ever found out how to get XAMPP - PHP to truly send an email, please let us know how. I arrived here searching for help as well.
Thanks. -- Fred
FKlusmann
 
Posts: 5
Joined: 18. August 2022 17:09
XAMPP version: 8.1.6
Operating System: Windows 11


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 87 guests