message.setTextBody("YouTube Direct was unable to upload a photo submission to Picasa.\n\n"
+ "There might be a service issue, or your Picasa configuration might be incorrect.\n\n"
+ "The photo in question is attached.");
BlobstoreService blobstoreService = BlobstoreServiceFactory.getBlobstoreService();
byte[] photoBytes = blobstoreService.fetchData(
photoEntry.getBlobKey(), 0, photoEntry.getOriginalFileSize() - 1);
MailService.Attachment photoAttachment =
new MailService.Attachment(photoEntry.getOriginalFileName(), photoBytes);
message.setAttachments(photoAttachment);