Subject: WriteThat.Name has updated your contact in my address book
Body:
I have just updated your contact in my address book thanks to WriteThat.Name, I think you should try it.
>>WriteThat.Name automatically updates your Gmail/Google Apps address book.
Get started here.
For more info on WriteThat.Name, there is a short video here.
- The Kwaga Team on behalf of philipp...@gmail.com
Sent to xx...@gmail.com
Received: from 174.129.194.51 (ec2-174-129-194-51.compute-1.amazonaws.com [174.129.194.51])
by mx.google.com with ESMTPS id a8sm2112451vdj.24.2011.09.08.01.12.58
(version=TLSv1/SSLv3 cipher=OTHER);
Thu, 08 Sep 2011 01:12:59 -0700 (PDT)
try {
switch (account.getAuthType()) {
case OAUTH_3LEGGED:
props.put("mail.smtp.ehlo", "true");
props.put("mail.smtp.auth", "false");
props.put("mail.smtp.starttls.enable", "true");
props.put("mail.smtp.starttls.required", "true");
props.put("mail.smtp.sasl.enable", "false");
props.put(XoauthSaslClientFactory.OAUTH_TOKEN_PROP, account.getAccessToken());
props.put(XoauthSaslClientFactory.OAUTH_TOKEN_SECRET_PROP, account.getAccessSecret());
props.put(XoauthSaslClientFactory.CONSUMER_KEY_PROP, "kwaga.com");
props.put(XoauthSaslClientFactory.CONSUMER_SECRET_PROP, "XXXXXXXXXXXXXXX");
props.put(XoauthSaslClientFactory.OAUTH_TYPE, OAuthType.THREE_LEGGED_OAUTH);
session = Session.getInstance(props);
auth = OAuthType.THREE_LEGGED_OAUTH;
consumer = new OAuthConsumer(null, "kwaga.com", "XXXXXXXXXXXXXXX", null);
break;
case OAUTH_2LEGGED:
props.put("mail.smtp.ehlo", "true");
props.put("mail.smtp.auth", "false");
props.put("mail.smtp.starttls.enable", "true");
props.put("mail.smtp.starttls.required", "true");
props.put("mail.smtp.sasl.enable", "false");
props.put(XoauthSaslClientFactory.OAUTH_TOKEN_PROP, account.getAccessToken());
props.put(XoauthSaslClientFactory.OAUTH_TOKEN_SECRET_PROP, "");
props.put(XoauthSaslClientFactory.CONSUMER_KEY_PROP, account.getAccessToken());
props.put(XoauthSaslClientFactory.CONSUMER_SECRET_PROP, account.getAccessSecret());
props.put(XoauthSaslClientFactory.OAUTH_TYPE, OAuthType.TWO_LEGGED_OAUTH);
session = Session.getInstance(props);
auth = OAuthType.TWO_LEGGED_OAUTH;
consumer = new OAuthConsumer(null, account.getAccessToken(), account.getAccessSecret(), null);
break;
default:
throw new KwagaPersistException("Unsuported AuthType " + account.getAuthType());
}
session.setDebug(true);
final URLName unusedUrlName = null;
SMTPTransport transport = new SMTPTransport(session, unusedUrlName);
// If the password is non-null, SMTP tries to do AUTH LOGIN.
final String emptyPassword = null;
transport.connect("smtp.gmail.com", 587, account.getMailAddress(), emptyPassword);
byte[] saslResponse = XoauthSaslResponseBuilder.buildResponse(account.getMailAddress(), XoauthProtocol.SMTP, account.getAccessToken(), account.getAccessSecret(), consumer, auth);
saslResponse = BASE64EncoderStream.encode(saslResponse);
transport.issueCommand("AUTH XOAUTH " + new String(saslResponse), 235);
result.setSession(session);
result.setTransport(transport);
return result;
} catch (Exception e) {
logger.error("Cannot connect to OAuth SMTP : " + e.getMessage());
return null;
}
}
--To view this discussion on the web visit https://groups.google.com/d/msg/google-apps-mgmt-apis/-/SZ5UNcysu2EJ.
You received this message because you are subscribed to the Google Groups "Google Apps Domain Information and Management APIs" group.
To post to this group, send email to google-app...@googlegroups.com.
To unsubscribe from this group, send email to google-apps-mgmt...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-apps-mgmt-apis?hl=en.
Jay--
You received this message because you are subscribed to the Google Groups "Google Apps Domain Information and Management APIs" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-apps-mgmt-apis/-/LcIiFZMoDRcJ.