Successfully implemented function for both sending text and photo.