Skip to content

Instantly share code, notes, and snippets.

@circlee
Created July 4, 2017 03:57
Show Gist options
  • Save circlee/ee6fdfbeecce48e4d3e7c605ed394f77 to your computer and use it in GitHub Desktop.
Save circlee/ee6fdfbeecce48e4d3e7c605ed394f77 to your computer and use it in GitHub Desktop.
private static String encodeNameWithAddress(String name, String address){
String returnStr = address;
try {
String encoded = MimeUtility.encodeText(name, "utf-8", "Q");
returnStr = encoded + "<"+address+">";
} catch (Exception e) {
e.printStackTrace();
}
return returnStr;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment