Sample code for 30+ languages & platforms
PHP

GMail SMTP/IMAP/POP Examples for Chilkat2 PHP