PHP Script Email configuration

Job ID: 32693091

Budget: $10 – $30 USD

I am using WHM Exim for email server.
When I send email from PHP script, it goes to spam simply because of a few things:
1. sending domain instead of the actual domain, it uses the server name or domain
2. envelope-from: instead of the actual from address it shows server domain
3. Signing domain is the server domain and not the from address domain name

This is the results / source for message sent from webmail: https://www.mail-tester.com/test-por08baw8

This message was sent from PHP Script https://www.mail-tester.com/test-d17kzwcc5&reloaded=1

I believe if PHP/Exim uses actual from address and not cpanel account name as sender, then the issue would be resolved.
Related categories: PHP System Admin Linux WHMCS Email Developer