You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Peter Sparkes <pe...@didm.co.uk> on 2015/03/05 18:25:50 UTC
Sending Email from a form
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",
cocoon.parameters.user,
cocoon.parameters.password);
}
mms.setFrom(fromemail);
mms.setTo(lodgeemail);
mms.setSubject(subject);
mms.setCc("info@wolseylodges.com");
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
Re: Sending Email from a form
Posted by Peter Sparkes <pe...@didm.co.uk>.
**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 <peter@didm.co.uk <ma...@didm.co.uk>> 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("info@wolseylodges.com" <ma...@wolseylodges.com>);
>
> 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: users-unsubscribe@cocoon.apache.org
> <ma...@cocoon.apache.org>
> For additional commands, e-mail: users-help@cocoon.apache.org
> <ma...@cocoon.apache.org>
>
>
>
>
> --
> Confucius said way too much ...
>
Re: Sending Email from a form
Posted by Jos Snellings <jo...@upperware.biz>.
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 <pe...@didm.co.uk> 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",
> cocoon.parameters.user,
> cocoon.parameters.password);
> }
>
> mms.setFrom(fromemail);
> mms.setTo(lodgeemail);
> mms.setSubject(subject);
> mms.setCc("info@wolseylodges.com" <in...@wolseylodges.com>);
>
> 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: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
--
Confucius said way too much ...
Re: Sending Email from a form
Posted by Peter Sparkes <pe...@didm.co.uk>.
Thank you all for your help. It is a smarthost problem with one particular email address
Peter
On 05/03/2015 17:50, Kunisch, Arne wrote:
>
> Dear Peter,
>
> you should check your notice from your email provider:
>
> https://www.bytemark.co.uk/support/document_library/smarthost/
>
> You use smtp.bytemark.co.uk as your smtp-relay.
>
> They describe in the document link above, why you should **not** do this anymore.
>
> Hope that helps,
>
> Arne
>
> *From:*Peter Sparkes [mailto:peter@didm.co.uk]
> *Sent:* Thursday, March 05, 2015 6:26 PM
> *To:* users@cocoon.apache.org
> *Subject:* Sending Email from a form
>
> 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",
> cocoon.parameters.user,
> cocoon.parameters.password);
> }
>
> mms.setFrom(fromemail);
> mms.setTo(lodgeemail);
> mms.setSubject(subject);
> mms.setCc("info@wolseylodges.com" <ma...@wolseylodges.com>);
>
> 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
>
RE: Sending Email from a form
Posted by "Kunisch, Arne" <a....@telekom.de>.
Dear Peter,
you should check your notice from your email provider:
https://www.bytemark.co.uk/support/document_library/smarthost/
You use smtp.bytemark.co.uk as your smtp-relay.
They describe in the document link above, why you should *not* do this anymore.
Hope that helps,
Arne
From: Peter Sparkes [mailto:peter@didm.co.uk]
Sent: Thursday, March 05, 2015 6:26 PM
To: users@cocoon.apache.org
Subject: Sending Email from a form
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",
cocoon.parameters.user,
cocoon.parameters.password);
}
mms.setFrom(fromemail);
mms.setTo(lodgeemail);
mms.setSubject(subject);
mms.setCc("info@wolseylodges.com"<ma...@wolseylodges.com>);
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
Re: Sending Email from a form
Posted by Javier Puerto <jp...@gmail.com>.
Hi Peter,
If the code worked for long time and now it's failing intermitently it's
probably due to changes in the mail server. I never seen this error before
but there's a lot of information about this SMTP status code like:
https://portal.my-tss.com/knowledgebase/139/Mail-Error-451-Could-not-verify-sender-.html
I hope this helps,
salu2.
2015-03-05 18:25 GMT+01:00 Peter Sparkes <pe...@didm.co.uk>:
> 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",
> cocoon.parameters.user,
> cocoon.parameters.password);
> }
>
> mms.setFrom(fromemail);
> mms.setTo(lodgeemail);
> mms.setSubject(subject);
> mms.setCc("info@wolseylodges.com" <in...@wolseylodges.com>);
>
> 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: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>