1

How to send email using gmail oAuth using PHP?

I'm using three-legged.php file and able to get inbox using IMAP (file is using this as default). But I want to use auth for sending mail. Not able to get it working. Can you please suggest.

Thanks, Prashant

skaffman
  • 398,947
  • 96
  • 818
  • 769
Prashant
  • 27
  • 8

3 Answers3

1

I think you mean SMTP Auth not OAuth, they are 2 entirely different things ;-)

See PHPMailer and the excellent example they give...

http://phpmailer.worxware.com/index.php?pg=examplebgmail

fire
  • 21,383
  • 17
  • 79
  • 114
  • Thanks for your answer but I certainly understand SMTP. But I wanted to use oAuth for sending mail from gmail. There is something missing in this http://stackoverflow.com/questions/2602680/how-to-implement-gmail-oauth-api-to-send-email-especially-via-smtp thread. This is what i wanted to ask. – Prashant Dec 18 '10 at 05:17
0

Try PHPMailer. It's an excellent class.

Refer This

Milind Anantwar
  • 81,290
  • 25
  • 94
  • 125
Lockhead
  • 2,423
  • 7
  • 35
  • 48
0

Have a look at https://pear.php.net/bugs/bug.php?id=18735

Dominik
  • 1,194
  • 6
  • 9