User = "YourUsername@gmail.com",
Password = "Password",
JID = exmpp_jid:parse(User),
Session = exmpp_session:start({1,0}),
exmpp_session:auth_info(Session, JID, Password),
{ok, _StreamId, _Features} = exmpp_session:connect_TCP(Session, "talk.l.google.com", 5222, [{starttls, enabled}]),
{ok, _FinalJID} = exmpp_session:login(Session, "PLAIN").