Most (big) companies just use a third party API like mailchimp. Just subscribe to a few company newsletter and look at the email header.
There is a reason if companies with a budget over millions will use thirdparty newsletter companies. You will have a lot of trouble with spam filters and problems you do not know yet ... there are even different laws in different countries. (example: in germany you must provide an unsubscribe link within the email).
those third party newsletter companies provide an api that you can integrate in php.