Answer the question
In order to leave comments, you need to log in
Why is Debian mail not being sent?
I want to send an email from my server to my gmail. Installed postfix.
postfix check - I write no errors
- echo "body" | mailx -s "subject" -r "test" [email protected]
does not give any errors, but the message does not even go to spam
in /var/log/mail.log nothing is added
I also put Apache on the server and tried this code send
<?php
$to = '[email protected]';
$subject = 'the subject';
$message = 'hello';
$headers = 'From: [email protected]' . "\r\n" .
'Reply-To: [email protected]' . "\r\n" .
'X-Mailer: PHP/' . phpversion();
mail($to, $subject, $message, $headers);
?>
Answer the question
In order to leave comments, you need to log in
run set + x
before the command = there is more exhaust,
you can see what the problem is
stasersmailov can you clarify what you want? Have your own mail server in your domain and send mail through it, or use a public server like mail.ru and send mail through it.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question