I am using Xiaoniao Cloud Server. PHP cannot use the mail function to send emails. I use codes to send emails. The sending always fails. I don’t know where the problem is.
yntdx2021-09-15 09:13:58
Check if the hostname is set correctly, or you need to set the sendmail path in the /etc/php.ini file. The method for setting the php sendmail path is as follows: open /etc/php.ini (not necessarily this path), and search; sendmail_path = change to sendmail_path = /usr/sbin/sendmail -t -i (not necessarily this path, you can find it through whereis sendmail). Then restart php and it will be OK.
autoload2021-09-14 13:55:18
You don’t post code or error messages here. Are you posting an advertisement or asking a question? Sorry, nothing can be done