So I linked the google app to my website. I need to use it to send people emails when they need to recover a password. I'm not exactly sure how this google apps thing works. But how do I send users that request password recovery an email from the google account with the information. What I'm asking is how do I write a php email script that uses the google mail account? I know I can write something like this:
<?php
$to = "recipient@example.com";
$subject = "Hi!";
$body = "Hi,\n\nHow are you?";
if (mail($to, $subject, $body)) {
echo("<p>Message successfully sent!</p>");
} else {
echo("<p>Message delivery failed...</p>");
}
But how do I send that automatically from my google account.