You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: extensions/modules/mail/src/main/java/org/exist/xquery/modules/mail/MailSessionFunctions.java
+53-16Lines changed: 53 additions & 16 deletions
Original file line number
Diff line number
Diff line change
@@ -24,6 +24,8 @@
24
24
25
25
importjava.util.Properties;
26
26
27
+
importjakarta.mail.Authenticator;
28
+
importjakarta.mail.PasswordAuthentication;
27
29
importjakarta.mail.Session;
28
30
29
31
importorg.apache.logging.log4j.LogManager;
@@ -43,6 +45,8 @@
43
45
importorg.exist.xquery.value.SequenceType;
44
46
importorg.exist.xquery.value.Type;
45
47
48
+
importorg.w3c.dom.Element;
49
+
46
50
/**
47
51
* eXist Mail Module Extension GetSession
48
52
*
@@ -68,28 +72,61 @@ public class MailSessionFunctions extends BasicFunction
68
72
newFunctionParameterSequenceType( "properties", Type.ELEMENT, Cardinality.ZERO_OR_ONE, "An optional JavaMail session properties in the form <properties><property name=\"\" value=\"\"/></properties>. The JavaMail properties are spelled out in Appendix A of the JavaMail specifications." )
69
73
},
70
74
newFunctionReturnSequenceType( Type.LONG, Cardinality.ZERO_OR_ONE, "an xs:long representing the session handle." )
newFunctionParameterSequenceType( "properties", Type.ELEMENT, Cardinality.ZERO_OR_ONE, "An optional JavaMail session properties in the form <properties><property name=\"\" value=\"\"/></properties>. The JavaMail properties are spelled out in Appendix A of the JavaMail specifications." ),
83
+
newFunctionParameterSequenceType( "authentication", Type.ELEMENT, Cardinality.EXACTLY_ONE, "The username and password for authentication in the form <authentication username=\"\" password=\"\"/>." )
84
+
},
85
+
newFunctionReturnSequenceType( Type.LONG, Cardinality.ZERO_OR_ONE, "an xs:long representing the session handle." )
@@ -107,6 +120,9 @@ public static java.util.Collection<SmtpImplementation> data() {
107
120
privatestaticfinalXmldbURIBIN_DOC1_NAME = XmldbURI.create("doc 1.bin"); // NOTE(AR) intentionally contains a space character to test correct encoding/decoding
0 commit comments