yes possible, for example using py/ext with a script like this one: http://libgmail.sourceforge.net/ but pd is not really good with strings afaik à+