Oscar Vazquez
Oscar Vazquez

Reputation: 145

how to configure php email in blue host to use mail() function?

I have migrated my php app to BlueHost hosting server, but notifications are not working anymore, I have created the file php.ini inside my root php application, and set

SMTP = localhost
smtp_port = 25
sendmail_path = /usr/sbin/sendmail -t -i

But emails are not being sent, in the last server it was working fine.

Thank you and grettings!

Upvotes: 1

Views: 2691

Answers (1)

Jim
Jim

Reputation: 3589

The SMTP ini directives are used on Windows only and is really only meant for development testing purposes.

You should use an SMTP library, such as PHPMailer, to relay the messages to an external server.

If you have access to install software on the server an alternative would be to set up a mail server (like Postfix) to relay messages to an outside server. The advantage of doing it this way is that you do not block script execution, but is much more advanced and difficult to set up.

Upvotes: 3

Related Questions