Mateusz Kusmierz
Mateusz Kusmierz

Reputation: 29

How to change php.ini parameters on ovh webcloud hosting

I would like send emails from my php webpage. I was doing that successfully on my temporary apache hosting on my PC.I need to change php.ini parameters such as sendmail_from, but there is no clear explanation how do I do that on OVH.

I was able to access php.ini file using SSH but I'm unable to save it (no permission).

I was trying to put .platform.app.yaml in the root folder as well as in the www folder using FTP explorer but it is not working either.

Upvotes: 0

Views: 1673

Answers (1)

Roberto Braga
Roberto Braga

Reputation: 559

Warning

Do not use php internal mail() function, it is cumbersome and mostly lead to errors. Especially when setting mail headers and attachments. It is much less configurable (as you are experiencing now) and is impossible to use modern smtp that require OAuth2.

Better use well tested php library like:

How to change php ini setting

Attention, not all hosting provider allow changing php.ini settings, therefore this is not sure if this will work.

The function to use is ini_set()

You need to set the sendmail_from, normally this should be done via email header. But many smtp replace the from address with the one used for the authentication.

Upvotes: 2

Related Questions