I call one of their apps, convert, from a perl script (in this case, resizing the image to 25% of its original size):
convert -sample 25%x25% image_in.jpg image_out.jpg
convert -sample 25%x25% image_in.jpg image_out.jpg
[pop3s]
accept = 127.0.0.1:110
connect = pop.gmail.com:995
; Use it for client mode
client = yes
[ssmtp]
accept = 127.0.0.1:465
connect = smtp.gmail.com:465
blat -install 127.0.0.1 your_user_name@gmail.com 1 465 - your_user_name your_password