You have an awful lot of text in your sketch and the uno has only 2K of RAM. Use of String objects will make your consumption of it worse. As a first pass at improving matters use the F macro on all your serial prints to move them to progmem. Like this:
Serial.print(F("Connecting to mail server "));