1

Is it possible to configure PHP to only send emails created using mail() to a specific list of whitelisted domains? E.g. An email to [email protected] is sent because domain1.com is on the whitelist but a mail to [email protected] is dropped because domain2.com is not. Even when the email itself is properly formed with correct headers.

PHP version 5.2.17

1 Answer 1

1

I think you are trying to prevent people sending spam, unfortunately people will always find a way to send mail from php. Even if you are able to limit the mail() function, nothing will prevent them from writing an own implementation that opens a socket.

So in short, there is no way to enforce this.

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .