I want to send an email from A to B,with HEADER and CONTENT through gmail.
How to do that by PHP?<
If the reason you want to use gmail is because you don't want to set up an MTA (the reason you stated in a comment to this answer), you have 2 options: