--
http://dotcms.com - Open Source Java Content Management
---
You received this message because you are subscribed to the Google Groups "dotCMS User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dotcms+un...@googlegroups.com.
To post to this group, send email to dot...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dotcms/ad5bd483-5114-4eeb-af7f-8610cc71b73c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To view this discussion on the web visit https://groups.google.com/d/msgid/dotcms/7b3f0c17-eb04-40ae-b522-efabcbbafa15%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dotcms/3b01a8ea-dbf1-4b1e-b92f-c06bdce266a0%40googlegroups.com.
For exactly this reason we wrote a class override for com.dotmarketing.util.Mailer. It saves a copy of any email attempt to the database with a success/fail flag indicating errors on the dotCMS side.
Later on, we run a servlet which finds any failed mail in that table and tries to resend it.
Fortunately we haven’t had major issues lately, but this will save us if we ever have one again.
We also have an override for com.dotmarketing.factories.EmailFactory which stops it from deleting the form bean just because the email failed. (Which was silly, because we want the form data stored regardless of the email being sent successfully.)
Nathan I. Keiter
|
Lead Network Applications Programmer
|
Administrative Advisory Council Member
|
Health Care Advisory Group Member
|
I.D.E.A Council Member
Gettysburg College | Information Technology | DataSystems
Campus Box 2453 | 300 North Washington Street | Gettysburg, PA 17325
Phone: 717.337.6993
To view this discussion on the web visit https://groups.google.com/d/msgid/dotcms/a151007b-7220-4c66-9e31-17235eb52ccc%40googlegroups.com.
For exactly this reason we wrote a class override for com.dotmarketing.util.Mailer. It saves a copy of any email attempt to the database with a success/fail flag indicating errors on the dotCMS side.
Later on, we run a servlet which finds any failed mail in that table and tries to resend it.
Fortunately we haven’t had major issues lately, but this will save us if we ever have one again.
You might be able to find the email in {install-root}\dotserver\tomcat-8.0.18\webapps\ROOT\email_backups\
Once you identify the email that was missing (by error timestamp), you can then match it to your access logs to see what form they tried to submit.
We had to do this once for hundreds of forms, which is a very painful process. (And why we introduced our override classes.)
Nathan I. Keiter
|
Lead Network Applications Programmer
|
Administrative Advisory Council Member
|
Health Care Advisory Group Member
|
I.D.E.A Council Member
Gettysburg College | Information Technology | DataSystems
Campus Box 2453 | 300 North Washington Street | Gettysburg, PA 17325
Phone: 717.337.6993
To view this discussion on the web visit https://groups.google.com/d/msgid/dotcms/5b7d256aef4c4345a4d67127bf7a1106%40exch13c.ms.gettysburg.edu.
Because if the return is false from m.sendMessage() https://github.com/dotCMS/core/blob/master-3.6/src/com/dotmarketing/factories/EmailFactory.java#L514
This code block runs: https://github.com/dotCMS/core/blob/master-3.6/src/com/dotmarketing/factories/EmailFactory.java#L562-L571
And then the form you just saved is deleted.
HibernateUtil.delete(formBean);
https://github.com/dotCMS/core/blob/master-3.6/src/com/dotmarketing/factories/EmailFactory.java#L565
So in a nutshell, if the mailer fails, it scrubs the database of that submission.
To view this discussion on the web visit https://groups.google.com/d/msgid/dotcms/9ae43268-aea4-49e8-a5c2-8cca2a547906%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to dotcms+unsubscribe@googlegroups.com.
To post to this group, send email to dot...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dotcms/9ae43268-aea4-49e8-a5c2-8cca2a547906%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
http://dotcms.com - Open Source Java Content Management
---
You received this message because you are subscribed to a topic in the Google Groups "dotCMS User Group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/dotcms/04oXJepknmo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to dotcms+unsubscribe@googlegroups.com.
To post to this group, send email to dot...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dotcms/9fd80a564551474abf6159436cfdba34%40exch13c.ms.gettysburg.edu.
The error is created fresh in that code block by dotCMS. https://github.com/dotCMS/core/blob/master-3.6/src/com/dotmarketing/factories/EmailFactory.java#L570
All it really means is that mailer.sendMessage() returned false.
If you want more detailed error handling, you should capture the real error in com.dotmarketing.util.Mailer.
Nathan I. Keiter
|
Lead Network Applications Programmer
|
Administrative Advisory Council Member
|
Health Care Advisory Group Member
|
I.D.E.A Council Member
Gettysburg College | Information Technology | DataSystems
Campus Box 2453 | 300 North Washington Street | Gettysburg, PA 17325
Phone: 717.337.6993
From: dot...@googlegroups.com [mailto:dot...@googlegroups.com]
On Behalf Of Vikrant Nimbalkar
Sent: Tuesday, August 30, 2016 1:52 PM
To: dot...@googlegroups.com
Subject: Re: [dotcms] EmailFactory Issue dotcms 3.3
got it.. lets say i am not concerned about saving/backup mail part for a moment. From code as we can see,firstly it will save form bean,then
send mail , if mail fails delete again(which as u said is silly).But my concern now is with sending the mail.
Does deleting formBean where the exception has occured , anything to do with m.sendMessage()? or the error has nothing to do with sending email?
On Tue, Aug 30, 2016 at 11:07 PM, Nathan Keiter <nke...@gettysburg.edu> wrote:
Because if the return is false from m.sendMessage() https://github.com/dotCMS/core/blob/master-3.6/src/com/dotmarketing/factories/EmailFactory.java#L514
This code block runs: https://github.com/dotCMS/core/blob/master-3.6/src/com/dotmarketing/factories/EmailFactory.java#L562-L571
And then the form you just saved is deleted.
HibernateUtil.delete(formBean);
https://github.com/dotCMS/core/blob/master-3.6/src/com/dotmarketing/factories/EmailFactory.java#L565
So in a nutshell, if the mailer fails, it scrubs the database of that submission.
Nathan I. Keiter
|
Lead Network Applications Programmer
|
Administrative Advisory Council Member
|
Health Care Advisory Group Member
|
I.D.E.A Council Member
Gettysburg College | Information Technology | DataSystems
Campus Box 2453 | 300 North Washington Street | Gettysburg, PA 17325
Phone: 717.337.6993
From: dot...@googlegroups.com [mailto:dot...@googlegroups.com] On Behalf Of Vikrant Nimbalkar
To view this discussion on the web visit
https://groups.google.com/d/msgid/dotcms/9ae43268-aea4-49e8-a5c2-8cca2a547906%40googlegroups.com.
For more options, visit
https://groups.google.com/d/optout.
--
http://dotcms.com - Open Source Java Content Management
---
You received this message because you are subscribed to a topic in the Google Groups "dotCMS User Group" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/dotcms/04oXJepknmo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to dotcms+un...@googlegroups.com.
To post to this group, send email to
dot...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dotcms/9fd80a564551474abf6159436cfdba34%40exch13c.ms.gettysburg.edu.
For more options, visit
https://groups.google.com/d/optout.
--
Thanks and regards,
Vikrantraje
--
http://dotcms.com - Open Source Java Content Management
---
You received this message because you are subscribed to the Google Groups "dotCMS User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
dotcms+un...@googlegroups.com.
To post to this group, send email to dot...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dotcms/CAJTNwhZbN2PWbpea6aqURY8%3DY6dD1O6KJckjUxoWHUGS%3D9vXbA%40mail.gmail.com.
Just FYI, the default Mailer class should be writing to your error log. Any logging activity near the other error?
Nathan I. Keiter
|
Lead Network Applications Programmer
|
Administrative Advisory Council Member
|
Health Care Advisory Group Member
|
I.D.E.A Council Member
Gettysburg College | Information Technology | DataSystems
Campus Box 2453 | 300 North Washington Street | Gettysburg, PA 17325
Phone: 717.337.6993
From: dot...@googlegroups.com [mailto:dot...@googlegroups.com] On Behalf Of Nathan Keiter
Sent: Tuesday, August 30, 2016 1:56 PM
To: dot...@googlegroups.com
To view this discussion on the web visit https://groups.google.com/d/msgid/dotcms/31c0429fde8c404b91e288b9d9d2a35a%40exch13c.ms.gettysburg.edu.
I better try to get error for further analysis. But yes as u said , there is no need to delete formbean if mail fails.Need to override Emailfactory class.Thanks for spending time and helping.
To unsubscribe from this group and stop receiving emails from it, send an email to dotcms+unsubscribe@googlegroups.com.
To post to this group, send email to dot...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dotcms/9ae43268-aea4-49e8-a5c2-8cca2a547906%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
http://dotcms.com - Open Source Java Content Management
---
You received this message because you are subscribed to a topic in the Google Groups "dotCMS User Group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/dotcms/04oXJepknmo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to dotcms+unsubscribe@googlegroups.com.
To post to this group, send email to dot...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dotcms/9fd80a564551474abf6159436cfdba34%40exch13c.ms.gettysburg.edu.
For more options, visit https://groups.google.com/d/optout.
--
Thanks and regards,
Vikrantraje
--
http://dotcms.com - Open Source Java Content Management
---
You received this message because you are subscribed to the Google Groups "dotCMS User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dotcms+unsubscribe@googlegroups.com.
To post to this group, send email to dot...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dotcms/CAJTNwhZbN2PWbpea6aqURY8%3DY6dD1O6KJckjUxoWHUGS%3D9vXbA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
--
http://dotcms.com - Open Source Java Content Management
---
You received this message because you are subscribed to a topic in the Google Groups "dotCMS User Group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/dotcms/04oXJepknmo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to dotcms+unsubscribe@googlegroups.com.
To post to this group, send email to dot...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dotcms/31c0429fde8c404b91e288b9d9d2a35a%40exch13c.ms.gettysburg.edu.
I have not checked..I will check other logs too.
To unsubscribe from this group and stop receiving emails from it, send an email to dotcms+unsubscribe@googlegroups.com.
To post to this group, send email to dot...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dotcms/9ae43268-aea4-49e8-a5c2-8cca2a547906%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
http://dotcms.com - Open Source Java Content Management
---
You received this message because you are subscribed to a topic in the Google Groups "dotCMS User Group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/dotcms/04oXJepknmo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to dotcms+unsubscribe@googlegroups.com.
To post to this group, send email to dot...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dotcms/9fd80a564551474abf6159436cfdba34%40exch13c.ms.gettysburg.edu.
For more options, visit https://groups.google.com/d/optout.
--
Thanks and regards,
Vikrantraje
--
http://dotcms.com - Open Source Java Content Management
---
You received this message because you are subscribed to the Google Groups "dotCMS User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dotcms+unsubscribe@googlegroups.com.
To post to this group, send email to dot...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dotcms/CAJTNwhZbN2PWbpea6aqURY8%3DY6dD1O6KJckjUxoWHUGS%3D9vXbA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
--
http://dotcms.com - Open Source Java Content Management
---
You received this message because you are subscribed to the Google Groups "dotCMS User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dotcms+unsubscribe@googlegroups.com.
To post to this group, send email to dot...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dotcms/31c0429fde8c404b91e288b9d9d2a35a%40exch13c.ms.gettysburg.edu.
For more options, visit https://groups.google.com/d/optout.
--
http://dotcms.com - Open Source Java Content Management
---
You received this message because you are subscribed to a topic in the Google Groups "dotCMS User Group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/dotcms/04oXJepknmo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to dotcms+unsubscribe@googlegroups.com.
To post to this group, send email to dot...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dotcms/6fc8450b1de941a9a354a7dc54aecf20%40exch13c.ms.gettysburg.edu.
Should be in dotcms.log chronologically near the one you saw.
Nathan I. Keiter
|
Lead Network Applications Programmer
|
Administrative Advisory Council Member
|
Health Care Advisory Group Member
|
I.D.E.A Council Member
Gettysburg College | Information Technology | DataSystems
Campus Box 2453 | 300 North Washington Street | Gettysburg, PA 17325
Phone: 717.337.6993
From: dot...@googlegroups.com [mailto:dot...@googlegroups.com]
On Behalf Of Vikrant Nimbalkar
Sent: Tuesday, August 30, 2016 2:05 PM
To: dot...@googlegroups.com
Subject: RE: [dotcms] EmailFactory Issue dotcms 3.3
I have not checked..I will check other logs too.
On Aug 30, 2016 23:28, "Nathan Keiter" <nke...@gettysburg.edu> wrote:
Just FYI, the default Mailer class should be writing to your error log. Any logging activity near the other error?
Nathan I. Keiter
|
Lead Network Applications Programmer
|
Administrative Advisory Council Member
|
Health Care Advisory Group Member
|
I.D.E.A Council Member
Gettysburg College | Information Technology | DataSystems
Campus Box 2453 | 300 North Washington Street | Gettysburg, PA 17325
Phone: 717.337.6993
From:
dot...@googlegroups.com [mailto:dot...@googlegroups.com]
On Behalf Of Nathan Keiter
Sent: Tuesday, August 30, 2016 1:56 PM
To: dot...@googlegroups.com
Subject: RE: [dotcms] EmailFactory Issue dotcms 3.3
The error is created fresh in that code block by dotCMS. https://github.com/dotCMS/core/blob/master-3.6/src/com/dotmarketing/factories/EmailFactory.java#L570
All it really means is that mailer.sendMessage() returned false.
If you want more detailed error handling, you should capture the real error in com.dotmarketing.util.Mailer.
Nathan I. Keiter
|
Lead Network Applications Programmer
|
Administrative Advisory Council Member
|
Health Care Advisory Group Member
|
I.D.E.A Council Member
Gettysburg College | Information Technology | DataSystems
Campus Box 2453 | 300 North Washington Street | Gettysburg, PA 17325
Phone: 717.337.6993
From:
dot...@googlegroups.com [mailto:dot...@googlegroups.com]
On Behalf Of Vikrant Nimbalkar
Sent: Tuesday, August 30, 2016 1:52 PM
To: dot...@googlegroups.com
Subject: Re: [dotcms] EmailFactory Issue dotcms 3.3
got it.. lets say i am not concerned about saving/backup mail part for a moment. From code as we can see,firstly it will save form bean,then
send mail , if mail fails delete again(which as u said is silly).But my concern now is with sending the mail.
Does deleting formBean where the exception has occured , anything to do with m.sendMessage()? or the error has nothing to do with sending email?
On Tue, Aug 30, 2016 at 11:07 PM, Nathan Keiter <nke...@gettysburg.edu> wrote:
Because if the return is false from m.sendMessage() https://github.com/dotCMS/core/blob/master-3.6/src/com/dotmarketing/factories/EmailFactory.java#L514
This code block runs: https://github.com/dotCMS/core/blob/master-3.6/src/com/dotmarketing/factories/EmailFactory.java#L562-L571
And then the form you just saved is deleted.
HibernateUtil.delete(formBean);
https://github.com/dotCMS/core/blob/master-3.6/src/com/dotmarketing/factories/EmailFactory.java#L565
So in a nutshell, if the mailer fails, it scrubs the database of that submission.
Nathan I. Keiter
|
Lead Network Applications Programmer
|
Administrative Advisory Council Member
|
Health Care Advisory Group Member
|
I.D.E.A Council Member
Gettysburg College | Information Technology | DataSystems
Campus Box 2453 | 300 North Washington Street | Gettysburg, PA 17325
Phone: 717.337.6993
From: dot...@googlegroups.com [mailto:dot...@googlegroups.com] On Behalf Of Vikrant Nimbalkar
To view this discussion on the web visit
https://groups.google.com/d/msgid/dotcms/9ae43268-aea4-49e8-a5c2-8cca2a547906%40googlegroups.com.
For more options, visit
https://groups.google.com/d/optout.
--
http://dotcms.com - Open Source Java Content Management
---
You received this message because you are subscribed to a topic in the Google Groups "dotCMS User Group" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/dotcms/04oXJepknmo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to dotcms+un...@googlegroups.com.
To post to this group, send email to
dot...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dotcms/9fd80a564551474abf6159436cfdba34%40exch13c.ms.gettysburg.edu.
For more options, visit
https://groups.google.com/d/optout.
--
Thanks and regards,
Vikrantraje
--
http://dotcms.com - Open Source Java Content Management
---
You received this message because you are subscribed to the Google Groups "dotCMS User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
dotcms+un...@googlegroups.com.
To post to this group, send email to
dot...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/dotcms/CAJTNwhZbN2PWbpea6aqURY8%3DY6dD1O6KJckjUxoWHUGS%3D9vXbA%40mail.gmail.com.
For more options, visit
https://groups.google.com/d/optout.
--
http://dotcms.com - Open Source Java Content Management
---
You received this message because you are subscribed to the Google Groups "dotCMS User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
dotcms+un...@googlegroups.com.
To post to this group, send email to
dot...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/dotcms/31c0429fde8c404b91e288b9d9d2a35a%40exch13c.ms.gettysburg.edu.
For more options, visit
https://groups.google.com/d/optout.
--
http://dotcms.com - Open Source Java Content Management
---
You received this message because you are subscribed to a topic in the Google Groups "dotCMS User Group" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/dotcms/04oXJepknmo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to dotcms+un...@googlegroups.com.
To post to this group, send email to
dot...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/dotcms/6fc8450b1de941a9a354a7dc54aecf20%40exch13c.ms.gettysburg.edu.
For more options, visit
https://groups.google.com/d/optout.
--
http://dotcms.com - Open Source Java Content Management
---
You received this message because you are subscribed to the Google Groups "dotCMS User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
dotcms+un...@googlegroups.com.
To post to this group, send email to dot...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dotcms/CAJTNwhYK6_AmmOLYMXnV-i9iBGwPDjfZheO3kP_ceGQ7-9FnJA%40mail.gmail.com.