501 Error with email processor

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

501 Error with email processor

Ethan Gruber
Hi all,

I am attempting to send an email with the oxf:email processor. I believe my input XML is set up correctly, but I'm getting the following error trying to send the email:

501 Syntax: HELO hostname in oxf:/apps/ceramics/xpl/xforms/send-email.xpl line 8 (javax.mail.MessagingException)

Postfix is installed, and I have logged onto the server and successfully sent an email over command line by following the traditional telnet commands (https://workaround.org/ispmail/lenny/test-mail-through-telnet).

I have found that you get this 501 error if you do not identify your own hostname, for example:

Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 servername ESMTP Postfix (Ubuntu)
helo
501 Syntax: HELO hostname

My /etc/hosts file has a hostname in it. Any ideas? Is this a problem with javax.mail.MessagingException not getting the hostname properly and identifying itself with the mail server, or is this a misconfiguration within my XPL?

Thanks,
Ethan

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Reply | Threaded
Open this post in threaded view
|

Re: 501 Error with email processor

Alessandro  Vernet
Administrator
Hi Ethan,

I don't remember seeing this in the past, so this might be due to you using the email processor with a config we haven't tried before. Would you be able to share with what are the inputs you provide to the email processor, so I can try this here?

Also, could you paste the whole Java stack trace?

Alex
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: 501 Error with email processor

Ethan Gruber
Hi Alex,

Here's the XPL: https://github.com/kerameikos/framework/blob/master/xpl/xforms/send-email.xpl

I am calling the XPL within the XForms app, passing in #email-input. I am returning #email-input as the output data back to the XForms app, as I got an error when xxforms:call-xpl failed to include an output.

The XForms app is at https://github.com/kerameikos/framework/blob/master/xforms/invite.xhtml. It is fairly straightforward. It accepts an email address in the form, and a trigger then sends an email to this address.

<xforms:trigger bind="invite-trigger">
<xforms:label><span class="glyphicon glyphicon-envelope"></span>Send Invitation</xforms:label>
<xforms:action ev:event="DOMActivate">
<!-- send email -->
<xforms:setvalue ref="instance('email-input')/body/html/body/p/a/@href" value="concat(instance('config')/url, 'signup?auth=', $hash)"/>
<xforms:setvalue ref="instance('email-input')/from/email" value="instance('config')/admin_email_from"/>
<xforms:setvalue ref="instance('email-input')/from/name" value="instance('config')/admin_email_from"/>
<xforms:setvalue ref="instance('email-input')/to/email" value="instance('email')"/>
<xforms:setvalue ref="instance('email-input')/to/name" value="instance('email')"/>
<xforms:insert nodeset="instance('dump')"
origin="xxforms:call-xpl('oxf:/apps/ceramics/xpl/xforms/send-email.xpl', 'email-input', instance('email-input'), 'data')"/>
</xforms:action>
</xforms:trigger>


On Friday, October 17, 2014 9:09:36 PM UTC-4, Alessandro Vernet wrote:
Hi Ethan,

I don't remember seeing this in the past, so this might be due to you using
the email processor with a config we haven't tried before. Would you be able
to share with what are the inputs you provide to the email processor, so I
can try this here?

Also, could you paste the whole Java stack trace?

Alex

-----
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
--
View this message in context: <a href="http://discuss.orbeon.com/501-Error-with-email-processor-tp4659139p4659140.html" target="_blank" onmousedown="this.href='http://www.google.com/url?q\75http%3A%2F%2Fdiscuss.orbeon.com%2F501-Error-with-email-processor-tp4659139p4659140.html\46sa\75D\46sntz\0751\46usg\75AFQjCNHOFANQIx0F7HMmDROkKqH6VKLvHQ';return true;" onclick="this.href='http://www.google.com/url?q\75http%3A%2F%2Fdiscuss.orbeon.com%2F501-Error-with-email-processor-tp4659139p4659140.html\46sa\75D\46sntz\0751\46usg\75AFQjCNHOFANQIx0F7HMmDROkKqH6VKLvHQ';return true;">http://discuss.orbeon.com/501-Error-with-email-processor-tp4659139p4659140.html
Sent from the Orbeon Forms community mailing list mailing list archive at Nabble.com.

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Reply | Threaded
Open this post in threaded view
|

Re: 501 Error with email processor

Ethan Gruber
I forgot to include the following (copied and pasted out of the orbeon.log)

An Error has Occurred                                                                                                 |
|----------------------------------------------------------------------------------------------------------------------|
|501 Syntax: HELO hostname                                                                                             |
|----------------------------------------------------------------------------------------------------------------------|
|Application Call Stack                                                                                                |
|----------------------------------------------------------------------------------------------------------------------|
|oxf:/apps/ceramics/xpl/xforms/send-email.xpl                                      |executing processor           |   8|
|······················································································································|
|element=<p:processor name="oxf:email">[...]</p:processor>                                                             |
|name   ={<a href="http://www.orbeon.com/oxf/processors}email">http://www.orbeon.com/oxf/processors}email                                                                   |
|----------------------------------------------------------------------------------------------------------------------|
|oxf:/apps/ceramics/xforms/invite.xhtml                                            |running XForms action         | 101|
|······················································································································|
|element    =<xforms:action ev:event="DOMActivate" id="xf-13">[...]</xforms:action>                                    |
|action name=xforms:action                                                                                             |
|----------------------------------------------------------------------------------------------------------------------|
|oxf:/apps/ceramics/xforms/invite.xhtml                                            |running XForms action         | 115|
|······················································································································|
|element    =<xforms:insert nodeset="instance('dump')" origin="xxforms:call-xpl('oxf:/apps/ceramics/xpl/xforms/send-ema|
|action name=xforms:insert                                                                                             |
|----------------------------------------------------------------------------------------------------------------------|
|oxf:/apps/ceramics/xforms/invite.xhtml                                            |evaluating XPath expression   | 115|
|······················································································································|
|expression=xxforms:call-xpl('oxf:/apps/ceramics/xpl/xforms/send-email.xpl', 'email-input', instance('email-input'), 'd|
|----------------------------------------------------------------------------------------------------------------------|
|----------------------------------------------------------------------------------------------------------------------|
|Exception: javax.mail.MessagingException                                                                              |
|----------------------------------------------------------------------------------------------------------------------|
|com.sun.mail.smtp.SMTPTransport                    |issueCommand                  |SMTPTransport.java            |1250|
|com.sun.mail.smtp.SMTPTransport                    |helo                          |SMTPTransport.java            | 774|
|com.sun.mail.smtp.SMTPTransport                    |protocolConnect               |SMTPTransport.java            | 316|
|javax.mail.Service                                 |connect                       |Service.java                  | 233|
|javax.mail.Service                                 |connect                       |Service.java                  | 134|
|javax.mail.Service                                 |connect                       |Service.java                  |  86|
|com.sun.mail.smtp.SMTPTransport                    |connect                       |SMTPTransport.java            | 144|
|javax.mail.Transport                               |send0                         |Transport.java                | 150|
|javax.mail.Transport                               |send                          |Transport.java                |  80|
|rbeon.oxf.processor.EmailProcessor$$anonfun$start$2|apply                         |EmailProcessor.scala          | 218|
|rbeon.oxf.processor.EmailProcessor$$anonfun$start$2|apply                         |EmailProcessor.scala          | 217|
|org.orbeon.oxf.util.ScalaUtils$                    |useAndClose                   |ScalaUtils.scala              |  97|
|org.orbeon.oxf.processor.EmailProcessor            |start                         |EmailProcessor.scala          | 217|
|g.orbeon.oxf.processor.pipeline.PipelineProcessor$4|run                           |PipelineProcessor.java        | 618|
|----------------------------------------------------------------------------------------------------------------------|
|Exception: org.orbeon.oxf.common.ValidationException                                                                  |


On Mon, Oct 20, 2014 at 3:31 PM, ewg4xuva <[hidden email]> wrote:
Hi Alex,

Here's the XPL: https://github.com/kerameikos/framework/blob/master/xpl/xforms/send-email.xpl

I am calling the XPL within the XForms app, passing in #email-input. I am returning #email-input as the output data back to the XForms app, as I got an error when xxforms:call-xpl failed to include an output.

The XForms app is at https://github.com/kerameikos/framework/blob/master/xforms/invite.xhtml. It is fairly straightforward. It accepts an email address in the form, and a trigger then sends an email to this address.

<xforms:trigger bind="invite-trigger">
<xforms:label><span class="glyphicon glyphicon-envelope"></span>Send Invitation</xforms:label>
<xforms:action ev:event="DOMActivate">
<!-- send email -->
<xforms:setvalue ref="instance('email-input')/body/html/body/p/a/@href" value="concat(instance('config')/url, 'signup?auth=', $hash)"/>
<xforms:setvalue ref="instance('email-input')/from/email" value="instance('config')/admin_email_from"/>
<xforms:setvalue ref="instance('email-input')/from/name" value="instance('config')/admin_email_from"/>
<xforms:setvalue ref="instance('email-input')/to/email" value="instance('email')"/>
<xforms:setvalue ref="instance('email-input')/to/name" value="instance('email')"/>
<xforms:insert nodeset="instance('dump')"
origin="xxforms:call-xpl('oxf:/apps/ceramics/xpl/xforms/send-email.xpl', 'email-input', instance('email-input'), 'data')"/>
</xforms:action>
</xforms:trigger>


On Friday, October 17, 2014 9:09:36 PM UTC-4, Alessandro Vernet wrote:
Hi Ethan,

I don't remember seeing this in the past, so this might be due to you using
the email processor with a config we haven't tried before. Would you be able
to share with what are the inputs you provide to the email processor, so I
can try this here?

Also, could you paste the whole Java stack trace?

Alex

-----
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
--
View this message in context: http://discuss.orbeon.com/501-Error-with-email-processor-tp4659139p4659140.html
Sent from the Orbeon Forms community mailing list mailing list archive at Nabble.com.

--
You received this message because you are subscribed to a topic in the Google Groups "Orbeon Forms" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/orbeon/6UWQp2jWyq4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to [hidden email].
To post to this group, send email to [hidden email].

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Reply | Threaded
Open this post in threaded view
|

Re: 501 Error with email processor

Alessandro  Vernet
Administrator
Hi Ethan,

And I imagine you used properties to setup the SMTP host (and possibly the username/password) to use? Is that a publically accessible SMTP server? If it is, could you add a debug on the data input of your email processor, and give me the properties you're using, so I can try to run this locally and reproduce the issue?

Alex
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet