sml:SendEMails without authentication?

852 views
Skip to first unread message

Mike Glamm

unread,
Apr 20, 2017, 5:41:43 PM4/20/17
to TopBraid Suite Users
I'm using sml:SendEMails in a SWP.  My SMTP server does not use authentication.  It seems like sml:SendEMails calls some Java method behind the scenes that always attempts to authenticate even though I do not specify user name and password.  I've tried setting the SMTP parameters via the TopBraid global configuration and also via sml:smtpServer.  Is it possible to use sml:SendEMails without authentication?  Error log below.


An unexpected error has occured.

On: Apr 20, 2017 4:36:28 PM

Reason:
javax.mail.MessagingException: Unable to obtain SASL authenticator
at org.apache.geronimo.javamail.transport.smtp.SMTPConnection.processAuthentication(SMTPConnection.java:1040)
at org.apache.geronimo.javamail.transport.smtp.SMTPConnection.protocolConnect(SMTPConnection.java:155)
at org.apache.geronimo.javamail.transport.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:165)
at javax.mail.Service.connect(Service.java:274)
at javax.mail.Service.connect(Service.java:91)
at javax.mail.Service.connect(Service.java:76)
at org.topbraid.email.sm.SendEMailsModule.doSendMessages(SendEMailsModule.java:160)
at org.topbraid.email.sm.SendEMailsModule$1.run(SendEMailsModule.java:89)
at java.lang.Thread.run(Thread.java:745)

Holger Knublauch

unread,
Apr 20, 2017, 7:18:28 PM4/20/17
to topbrai...@googlegroups.com
Hi Mike,

I checked the source code of this module and it seems to bypass authentication if the user name is null. In case you know Java a bit, here is the relevant snippet:

        if (userName != null) {
            props.put(prefix + ".auth", "true");
            Authenticator auth = new Authenticator() {
                @Override
                protected PasswordAuthentication getPasswordAuthentication() {
                    return new PasswordAuthentication(userName, password);
                }
            };
            return Session.getInstance(props, auth);
        }
        else {
            props.put(prefix + ".auth", "false");
            return Session.getInstance(props);
        }

So yes, it should be possible without authentication, but I don't have a server where I could confirm that.

HTH
Holger
--
You received this message because you are subscribed to the Google Group "TopBraid Suite Users", the topics of which include the TopBraid Suite family of products and its base technologies such as SPARQLMotion, SPARQL Web Pages and SPIN.
To post to this group, send email to topbrai...@googlegroups.com
---
You received this message because you are subscribed to the Google Groups "TopBraid Suite Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to topbraid-user...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Mike Glamm

unread,
Apr 21, 2017, 10:26:56 AM4/21/17
to TopBraid Suite Users
Thanks.. I was able to get it working.

Mike
Reply all
Reply to author
Forward
0 new messages