문제

php.ini shows that it is using sendmail (which I have confirmed as installed) with the setting:

sendmail_path = /usr/sbin/sendmail -t -i

I want to change sendmail so that it:

  1. Uses port 587
  2. Uses SMTP Authentication (from a file I'll create with username:password)

But when I look for "sendmail.cf" (via find / -name "sendmail") it doesn't show up. How would I configure sendmail/PHP to do this without that file?

도움이 되었습니까?

해결책

As mentioned above: Are you sure sendmail is installed on the system? It's possible that there could be a different MTA installed on the system (such as qmail, postfix, exim). Most other MTA's will create a symlink /usr/sbin/sendmail which points to some other binary. This is done for backwards compatability with sendmail. You might want to check whether /usr/sbin/sendmail is a symlink. If so, where does it point to?

Since you are using PHP, another workaround may be to use phpmailer. You can use phpmailer to send outgoing messages through a remote mail server using SMTP authentication (on port 587 if necessary), bypassing whatever local MTA is installed on the system altogether.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top