M
M
Mr__Twister2017-08-20 10:20:48
PHP
Mr__Twister, 2017-08-20 10:20:48

How to send mail via mail() function in php on mac?

Good afternoon and thank you for your attention.
I'm learning PHP from a book and now I've reached the point where you need to send a prepared letter to a real mailbox using the mail () function. The task was complicated by the fact that I have a Mac OS with a built-in web server. I don’t understand the config device at all, hence the question:
Does Mac OS have a built-in mail server that can send mail to a real mailbox (for example, Yandex)? How to run it?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
U
Unrecoverable Recursion, 2017-08-20
@Testaras

You need to set up an SMTP server, this can be done as follows:
Editing the file: sudo emacs /System/Library/LaunchDaemons/org.postfix.master.plist.
Add: RunAtLoadKeepAlive before the closing tag.
Run: sudo postfix start.
Make sure SMPT is running (port forwarding): telnet localhost 25
Other options: https://stackoverflow.com/questions/11174682/how-t...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question