My wife discovered a problem with certain contacts last night. If you have any contacts whose name contains a comma in it, the email engine will fail to send the message and exit with code 5.
"Smith, John" <firstname.lastname@example.org>will cause the problem.
For now, the workarounds are to either change your contacts in Gmail, or simply delete the comma before hitting the Export button.
I'll try to take care of this automatically in the next releases. This affects iPhoto2Gmail v0.9 and Aperture2Gmail v0.4