We do not need to sp...">

What happens when we use mail () in PHP?

<?php
mail("joecool@example.com", "My Subject", "Line 1\nLine 2\nLine 3");
?> 

We do not need to specify email/password/mail server address && port, but it can be sent.

+3
source share
4 answers

This is because the email address / port / password / mail server is defined in your PHP.ini file.

+4
source

On * nix sendmail(8)is invoked.

+3
source

I believe that he was kept at php.ini.

+2
source

PHP mail()does not support SMTP authentication. If you need SMTP authentication, http://pear.php.net/package/Mail

+1
source

Source: https://habr.com/ru/post/1731967/


All Articles