Re: Sending Email from a form
Peter Sparkes <[email protected]> Thu, 05 Mar 2015 18:17:17 +0000
| Newsgroups | gmane.text.xml.cocoon.user |
|---|---|
| Message-ID | <[email protected]> |
**com.sun.mail.smtp.SMTPAddressFailedException: 451-Unable to verify recipient -- see http://www.bytemark.co.uk/smarthost for 451 help. On 05/03/2015 17:47, Jos Snellings wrote: > Hi Peter, > > Cannot read the message. Can you send it as quoted text please? > > Kind regards, > Jos > > On Thu, Mar 5, 2015 at 6:25 PM, Peter Sparkes <[email protected] <mailto:[email protected]>> wrote: > > Hi > > I have an application that used a form to send emails. > > This has worked successfully for many years. However, recently users have reported getting > error messages, as per the attached. > > My testing has shown that: > > * Sometime the send email works as it should. > * Sometimes it does not and the user gets the attached error message. > > > My email javascript is: > > try { > mms = cocoon.getComponent(Packages.org.apache.cocoon.mail.MailSender.ROLE); > > if (cocoon.parameters.host != "" || cocoon.parameters.user != "") { > mms.setSmtpHost("smtp.bytemark.co.uk <http://smtp.bytemark.co.uk>", > cocoon.parameters.user, > cocoon.parameters.password); > } > > mms.setFrom(fromemail); > mms.setTo(lodgeemail); > mms.setSubject(subject); > mms.setCc("[email protected]" <mailto:[email protected]>); > > mms.setBody(body1, "text/plain; charset=utf-8"); > > //mms.addAttachment(cocoon.request.get("attachment")); > //mms.addAttachmentURL("cocoon:///"); > // mms.addAttachmentURL("context://welcome.xml"); > > mms.send(); > > } finally { > cocoon.releaseComponent(mms); > } > > Has anybody any ideas, please. > > Peter Sparkes > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > <mailto:[email protected]> > For additional commands, e-mail: [email protected] > <mailto:[email protected]> > > > > > -- > Confucius said way too much ... >