If you're here because you set it properly but it doesn't work, please contact your host provider to allow following requirements in their server for you.
1. Enable proc_open() extension in WHM (root) -> PHP ini:
1) Set allow_url_fopen = on
2) Remove proc_open from disable_function
2. Enable TCP_OUT = 465 in WHM > Plugins > ConfigServer Security & Firewall > Firewall Configuration.
This will fix the problem on Email is not sent from Online Form.