I don't have an arduino sketch, but here is a sample telnet session where I talk to the SMTP server directly. Stuff in blue is the response from the server, red is what I send. Green is just telnet session overhead.

Note the SMTP responses are 3 digit codes followed by explanatory text. You can probably write a very robust client by interpreting the numbers and ignoring all the following text (which makes arduino the code simpler).

Note this in no way addresses the authentication you may have to do, but it would be handled similarly.

It also doesn't address any encrypted links (e.g. TLS) which would be practically impossible on an arduino.

if (client.connect()) {Serial.println("connected"); client.println("EHLO MYSERVER"); client.println("MAIL FROM:<someone@somewhere.com>"); client.println("RCPT TO:<TheTarget@ThisDomain.com>"); client.println("DATA"); client.println("SUBJECT: This is the subject"); client.println(); client.println("This is the body.); client.println("This is another line of the body."); client.println("."); client.println("."); } else {Serial.println("connection failed"); }}