When you share/email a photo from iPhoto, it uses the configured Mail application, by default Apple Mail. iPhoto then resizes the photos as specified and creates a new email in your Mail app. You then send the email, with photos. If you can't send the email, seeing that you have a new email...