How to access smtp.gmail.com or other to send email

I suppose you got the code here.
http://playground.arduino.cc/Code/Email

If so, in the second example at line 37

// replace this
  if(inChar == 'e')

// with something like this
  if(triggerPin == HIGH)