电子邮件域包含非法字符

时间:2019-12-09 20:35:28

标签: java email

我们正在尝试阅读包含以下内容的电子邮件地址     即使设置了props.setProperty(“ mail.mime.address.strict”,“ false”),电子邮件地址之间的单引号”也会出现错误,
错误信息:     19/12/05 17:06:42(996)工作者标准:JavascriptProbe-2e8e4da11b2d0010fe3564207e4bcb77 javax.mail.internet.AddressException:域包含非法字符     由MID服务器脚本中的错误引起的,在第114行包含“ Case_Creation”

    112:                                                for (var i = 0; i < emailrun; i++) {^M
    113:                                                        
==> 114:                                                        var getToRecepient = messages[i].getRecipients(Packages.javax.mail.Message.RecipientType.TO);^M
javax.mail.internet.InternetAddress.checkAddress(InternetAddress.java:1432)
javax.mail.internet.InternetAddress.parse(InternetAddress.java:1215)
javax.mail.internet.InternetAddress.parseHeader(InternetAddress.java:777)
javax.mail.internet.MimeMessage.getAddressHeader(MimeMessage.java:756)
javax.mail.internet.MimeMessage.getRecipients(MimeMessage.java:582)
sun.reflect.GeneratedMethodAccessor77.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
java.lang.reflect.Method.invoke(Method.java:498)
org.mozilla.javascript.MemberBox.invoke(MemberBox.java:138)
org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:292)
org.mozilla.javascript.ScriptRuntime.doCall(ScriptRuntime.java:2585)
org.mozilla.javascript.optimizer.OptRuntime.call1(OptRuntime.java:32)
org.mozilla.javascript.gen.script_include_Case_Creation_85._c_anonymous_1(script_include:ESC_CSM_Case_Creation:114)
org.mozilla.javascript.gen.script_include_Case_Creation_85.call(script_include:ESC_CSM_Case_Creation)

I am using props.setProperty("mail.mime.address.strict", "false"); to bypass the email validation and read the email address but it is not working getting the same error.

0 个答案:

没有答案