0

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.

voscausa
  • 11,253
  • 2
  • 39
  • 67
John Bernal
  • 230
  • 5
  • 21

1 Answers1

0

Search for DKIM (DomainKeys Identified Mail);

-> Setup your google apps

-> use dkim library

This links will help you :

  1. DKIM
  2. DKIM Stackoverflow question
  3. Implemented Here (Check the registrartion email)
Community
  • 1
  • 1
Dino Babu
  • 5,814
  • 3
  • 24
  • 33