private static string CreateSignature(User user) { var header = @"<HTML><HEAD><meta http-equiv='Content-Type' content='text/html; charset=UTF-8' /></HEAD>"; var body = string.Format("<BODY><P><STRONG>" + "<FONT style='FONT-SIZE: 14pt'>{0}</FONT><BR>" + "<FONT style='FONT-SIZE: 12pt'>{1}</FONT><BR>" + "<FONT style='FONT-SIZE: 10pt'>VuWall Technology, Inc.</FONT><BR>" + "</STRONG>" + "<STRONG>T:</STRONG> {2} {3} {4}<BR>", //T: ###-#### | C: ###-#### | Skype: <NAME> user.DisplayName, user.JobTitle, user.PhoneNumber, // Only add cell number / Skype name if one has been defined. String.IsNullOrWhiteSpace(user.CellNumber) ? "" : string.Format("| <STRONG>C:</STRONG> {0}", user.CellNumber), String.IsNullOrWhiteSpace(user.SkypeName) ? "" : string.Format("| <STRONG>Skype:</STRONG> {0}", user.SkypeName)); var footer = @" <A title=VuWall href='http://www.vuwall.com'><IMG border=0 hspace=0 alt=VuWall src='http://vuwall.com/wp-content/uploads/2013/07/EmailLogoNoBorder.png'></A> <A title=LinkedIn href='https://www.linkedin.com/company/vuwall'><IMG border=0 hspace=0 alt=LinkedIn src='http://vuwall.com/wp-content/uploads/2013/07/LIIcon.png'></A> <A title=YouTube href='https://www.youtube.com/user/VuWall'><IMG border=0 hspace=0 alt=YouTube src='http://vuwall.com/wp-content/uploads/2013/07/YTIcon.png'></A> <A title=Facebook href='https://www.facebook.com/vuwall'><IMG border=0 hspace=0 alt=Facebook src='http://vuwall.com/wp-content/uploads/2013/07/FBIcon.png'></A> <A title=Twitter href='https://www.twitter.com/VuWall'><IMG border=0 hspace=0 alt=Twitter src='http://vuwall.com/wp-content/uploads/2013/07/TwitterIcon.png'></A> </P></BODY></HTML>"; var fullSignature = header + body + footer; return fullSignature; }
private static void SendToGoogle(User user, string signature, GoogleMailSettingsService service) { try { Console.Write("Updating user: "******"..."); service.UpdateSignature(user.AccountName, signature); Console.WriteLine("Success."); } catch (GDataRequestException gdre) { Console.WriteLine("Could not update user: "******" - Reason: " + gdre.ResponseString); } }