in src/main/java/org/apache/commons/mail/Email.java [1915:1934]
private String createFoldedHeaderValue(final String name, final String value)
{
if (EmailUtils.isEmpty(name))
{
throw new IllegalArgumentException("name can not be null or empty");
}
if (value == null || EmailUtils.isEmpty(value))
{
throw new IllegalArgumentException("value can not be null or empty");
}
try
{
return MimeUtility.fold(name.length() + 2, MimeUtility.encodeText(value, this.charset, null));
}
catch (final UnsupportedEncodingException e)
{
return value;
}
}