measuring temperature and sending emails from arduino using the ethernet

Hello

I am making a project where I will measure temperature with a DHT11 sensor and send emails from arduino using the Ethernet. I am not sure how to combine those two codes together. So far I can measure the temperature and send emails with two separate codes.

Does anyone have any suggestions on that?

Thank you