Created
July 4, 2017 03:56
-
-
Save circlee/219792d2f695a86cfb57b8e493773946 to your computer and use it in GitHub Desktop.
encodeNameWithAddress
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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