I want to send email with PHP

Removed spam message

You need to setup your outgoing mail service in your php.ini if you want to use the core mail() function.

Otherwise, use a library to configure an outgoing SMTP server. This is a nice lib: https://packagist.org/packages/nette/mail

edited Jan '19

Use mailgun free for 10 000 mail by month with a great service and an easy library.
https://www.mailgun.com/
https://documentation.mailgun.com/en/latest/libraries.html#php

首先要在 php.ini 配置 SMTP 服务账号密码, 并且确保你的服务器 25 端口是否开放