I have a website that sends two emails to customers each time they make a purchase. One email is an invoice and the second contains instructions. This project is two parts but both relating to this mail function and the PHP script:
Part 1: Often emails sent to customers via this PHP email script end up in the junk email folder. This site is hosted on a shared Linux server and I understand this is a common problem when mail is send via such scripts. I am seeking a solution to this problem. It may involve changing the scripting, modifying settings on the server or potentially installing a third party mail application (paid or unpaid such as PEAR) if necessary. Potentially using such an application to send mail using SSL and a separate ISP's SMTP outbound mail server rather than that of the website host.
Part 2: When the customer does receive an email there is an issue with the PHP code which is causing the formatting to have some problems. Please see the attached file called Customer Email.JPG.
- Firstly, at the top of the email I just need to provide the customers name which will be pulled from the MySQL database with the other information (“Hi Nathan,”). This doesn't now happen.
- Secondly, you will see there is a large amount of white space at the top of the email for some reason. This has to be taken away so it does not have this excess white space.
- When an email is sent I also need a record of this so it can be resent if needed. This may simply mean each mail is also sent BCC to an email address I specify that will not change.