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:
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!