Skip to content

Instantly share code, notes, and snippets.

@circlee
Created July 4, 2017 03:56
Show Gist options
  • Save circlee/219792d2f695a86cfb57b8e493773946 to your computer and use it in GitHub Desktop.
Save circlee/219792d2f695a86cfb57b8e493773946 to your computer and use it in GitHub Desktop.
encodeNameWithAddress
private static String encodeNameWithAddress(String name, String address){
String returnStr = address;
try {
String encoded = MimeUtility.encodeText(name, "utf-8", "B");
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