PHP script to send Auto Replies from Gmail

GMail autoresponders (eg: filter + canned responses) will get sent to the senders “Return-Path”. When an email comes from Mandrill the “Return-Path” is a mandrill address, not the senders address.

So gmail autoresponders do not work for any email that comes from mandrill (or other services who set a Return-Path different to the senders address).

Since contact forms through the Envato marketplaces go through Mandrill, this means it’s not possible to send autoresponders to those emails from Gmail. Annoying!

Started working on a little PHP script that will connect to my Gmail account every 15 minutes, find certain emails and then send an autoreply to those emails:

Todo: re-write everything after line 130 to use google SMTP etc..

Leave a Reply

Your email address will not be published.