Re: Send E-Mails

2019-03-26 Thread Jacques Le Roux

Yep

Jacques

Le 26/03/2019 à 09:37, Gil Portenseigne a écrit :

What I understand is that to keep granted right after the migration if
our confluence id is différent from our apache id, we must fill in a
INFRA Jira to make the switch ?


Le 09:23 - mardi 26 mars, Jacques Le Roux a écrit :

Makes sense Pierre,

Please Gil checks https://issues.apache.org/jira/browse/INFRA-18028

HTH

Jacques

Le 26/03/2019 à 09:16, Pierre Smits a écrit :

Hi Gil,

Does this maybe have something to do with recent migration by INFRA to have
ApacheIds (LDAP)+password being usable as login credentials? I can't edit
either.

Best regards,

Pierre Smits

*Apache Trafodion , Vice President*
*Apache Directory , PMC Member*
Apache Incubator , committer
*Apache OFBiz ,  10 years a contributor without
privileges*
Apache Steve , committer


On Tue, Mar 26, 2019 at 8:56 AM Gil Portenseigne <
gil.portensei...@nereide.fr> wrote:


Hello there,

Do somes actions have been taken on documenting the existence of
SystemProperty ?

I like the idea of migrating documentation into embedded one.

I just wanted to add a note into https://s.apache.org/BPJ5 that alert
about SystemProperty, but i seem to miss the modification permission...
can someone grant me access ?

Thanks

Gil


Le 12:50 - vendredi 11 mai, Taher Alkhateeb a écrit :

Actually, I think whatever need to be documented is best placed in our
embedded documentation. We should probably consider freezing all new
documentation in any place that is not the embedded documentation and try
to migrate everything to it. So email setting docs could be placed
somewhere in our user manual.

On Fri, May 11, 2018, 11:51 AM Jacques Le Roux <

jacques.le.r...@les7arts.com>

wrote:


Hi Rishi,


Le 09/05/2018 ą 11:12, Rishi Solanki a écrit :

Community, I think we should mention the SystemProperty where

required in

Production Setup Guide or may be we can add version of production

setup

guide which will tells user upto which release this production setup

guide

will work. I know we discuss this kind of effort in past for all the
documents and we agree on some point. But this is quicker to manage
Production Setup Guide, if we agree then I can do it.

Yes good idea, a simple information for concerned versions in the

current

Production Setup Guide fits with me

Jacques

I'm fine with either change the existing one or maintain the

version. But

first we should have one which works always with latest. Thanks!


Rishi Solanki
Sr Manager, Enterprise Software Development
HotWax Systems Pvt. Ltd.
Direct: +91-9893287847
http://www.hotwaxsystems.com
www.hotwax.co

On Wed, May 9, 2018 at 3:33 AM, i...@agentur-m3.de <

i...@agentur-m3.de>

wrote:


Hello,

here is a problem with my e-mail base-configuration.

I configured email according to the setup guide:



https://cwiki.apache.org/confluence/display/OFBIZ/Apache+OFBiz+Technical+

Production+Setup+Guide#ApacheOFBizTechnicalProduction
SetupGuide-EmailServerSettings


Unfortunately no email seems to be sent from server
(the send email button in partymgr works fine now (thanks to

Jacques!),

but no email reaches client). No error message, no error in log.

Also I tried to register in the ecommerce system and send
an "Forgot Your Password" email, but none of the emails were sent.

To get more info about the problem, I wrote a groovy script and

copied

parts of the sendEmail-code from EmailServices.java.
The script below surprisingly works fine and sends emails!

So I don't understand, why OFBiz itself does not send mails.
Is there any further configuration necessary?



The script (which sends mails):

import javax.mail.Session;

import javax.activation.DataHandler;
import javax.activation.DataSource;
import javax.mail.Message;
import javax.mail.MessagingException;
import javax.mail.SendFailedException;
import javax.mail.Session;
import javax.mail.Transport;
import javax.mail.internet.InternetAddress;
import javax.mail.internet.MimeBodyPart;
import javax.mail.internet.MimeMessage;
import javax.mail.internet.MimeMultipart;
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.transform.stream.StreamSource;

import org.apache.fop.apps.Fop;
import org.apache.fop.apps.MimeConstants;
import org.apache.ofbiz.base.util.Debug;
import org.apache.ofbiz.base.util.GeneralException;
import org.apache.ofbiz.base.util.HttpClient;
import org.apache.ofbiz.base.util.HttpClientException;
import org.apache.ofbiz.base.util.UtilGenerics;
import org.apache.ofbiz.base.util.UtilMisc;
import org.apache.ofbiz.base.util.UtilProperties;
import org.apache.ofbiz.base.util.UtilValidate;
import org.apache.ofbiz.base.util.collections.MapStack;
import org.apache.ofbiz.base.util.string.FlexibleStringExpander;
import org.apache.ofbiz.entity.Delegator;
import org.apache.ofbiz.entity.GenericValue;
import org.apache.ofbiz.entity.util.Enti

Re: Send E-Mails

2019-03-26 Thread Gil Portenseigne
What I understand is that to keep granted right after the migration if
our confluence id is différent from our apache id, we must fill in a
INFRA Jira to make the switch ?


Le 09:23 - mardi 26 mars, Jacques Le Roux a écrit :
> Makes sense Pierre,
> 
> Please Gil checks https://issues.apache.org/jira/browse/INFRA-18028
> 
> HTH
> 
> Jacques
> 
> Le 26/03/2019 à 09:16, Pierre Smits a écrit :
> > Hi Gil,
> > 
> > Does this maybe have something to do with recent migration by INFRA to have
> > ApacheIds (LDAP)+password being usable as login credentials? I can't edit
> > either.
> > 
> > Best regards,
> > 
> > Pierre Smits
> > 
> > *Apache Trafodion , Vice President*
> > *Apache Directory , PMC Member*
> > Apache Incubator , committer
> > *Apache OFBiz ,  10 years a contributor without
> > privileges*
> > Apache Steve , committer
> > 
> > 
> > On Tue, Mar 26, 2019 at 8:56 AM Gil Portenseigne <
> > gil.portensei...@nereide.fr> wrote:
> > 
> > > Hello there,
> > > 
> > > Do somes actions have been taken on documenting the existence of
> > > SystemProperty ?
> > > 
> > > I like the idea of migrating documentation into embedded one.
> > > 
> > > I just wanted to add a note into https://s.apache.org/BPJ5 that alert
> > > about SystemProperty, but i seem to miss the modification permission...
> > > can someone grant me access ?
> > > 
> > > Thanks
> > > 
> > > Gil
> > > 
> > > 
> > > Le 12:50 - vendredi 11 mai, Taher Alkhateeb a écrit :
> > > > Actually, I think whatever need to be documented is best placed in our
> > > > embedded documentation. We should probably consider freezing all new
> > > > documentation in any place that is not the embedded documentation and 
> > > > try
> > > > to migrate everything to it. So email setting docs could be placed
> > > > somewhere in our user manual.
> > > > 
> > > > On Fri, May 11, 2018, 11:51 AM Jacques Le Roux <
> > > jacques.le.r...@les7arts.com>
> > > > wrote:
> > > > 
> > > > > Hi Rishi,
> > > > > 
> > > > > 
> > > > > Le 09/05/2018 ą 11:12, Rishi Solanki a écrit :
> > > > > > Community, I think we should mention the SystemProperty where
> > > required in
> > > > > > Production Setup Guide or may be we can add version of production
> > > setup
> > > > > > guide which will tells user upto which release this production setup
> > > > > guide
> > > > > > will work. I know we discuss this kind of effort in past for all the
> > > > > > documents and we agree on some point. But this is quicker to manage
> > > > > > Production Setup Guide, if we agree then I can do it.
> > > > > Yes good idea, a simple information for concerned versions in the
> > > current
> > > > > Production Setup Guide fits with me
> > > > > 
> > > > > Jacques
> > > > > > I'm fine with either change the existing one or maintain the
> > > version. But
> > > > > > first we should have one which works always with latest. Thanks!
> > > > > > 
> > > > > > 
> > > > > > Rishi Solanki
> > > > > > Sr Manager, Enterprise Software Development
> > > > > > HotWax Systems Pvt. Ltd.
> > > > > > Direct: +91-9893287847
> > > > > > http://www.hotwaxsystems.com
> > > > > > www.hotwax.co
> > > > > > 
> > > > > > On Wed, May 9, 2018 at 3:33 AM, i...@agentur-m3.de <
> > > i...@agentur-m3.de>
> > > > > > wrote:
> > > > > > 
> > > > > > > Hello,
> > > > > > > 
> > > > > > > here is a problem with my e-mail base-configuration.
> > > > > > > 
> > > > > > > I configured email according to the setup guide:
> > > > > > > 
> > > > > > > 
> > > https://cwiki.apache.org/confluence/display/OFBIZ/Apache+OFBiz+Technical+
> > > > > > > Production+Setup+Guide#ApacheOFBizTechnicalProduction
> > > > > > > SetupGuide-EmailServerSettings
> > > > > > > 
> > > > > > > 
> > > > > > > Unfortunately no email seems to be sent from server
> > > > > > > (the send email button in partymgr works fine now (thanks to
> > > Jacques!),
> > > > > > > but no email reaches client). No error message, no error in log.
> > > > > > > 
> > > > > > > Also I tried to register in the ecommerce system and send
> > > > > > > an "Forgot Your Password" email, but none of the emails were sent.
> > > > > > > 
> > > > > > > To get more info about the problem, I wrote a groovy script and
> > > copied
> > > > > > > parts of the sendEmail-code from EmailServices.java.
> > > > > > > The script below surprisingly works fine and sends emails!
> > > > > > > 
> > > > > > > So I don't understand, why OFBiz itself does not send mails.
> > > > > > > Is there any further configuration necessary?
> > > > > > > 
> > > > > > > 
> > > > > > > 
> > > > > > > The script (which sends mails):
> > > > > > > 
> > > > > > > import javax.mail.Session;
> > > > > > > 
> > > > > > > import javax.activation.DataHandler;
> > > > > > > import javax.activation.DataSource;
> > > > > > > import javax.mail.Message;
> > > > > > > import javax.mail.MessagingException;
> > > > 

Re: Send E-Mails

2019-03-26 Thread Gil Portenseigne
Thanks Jacques :)


Le 09:21 - mardi 26 mars, Jacques Le Roux a écrit :
> Hi Gil,
> 
> Let me check
> 
> Jacques
> 
> Le 26/03/2019 à 08:56, Gil Portenseigne a écrit :
> > Hello there,
> > 
> > Do somes actions have been taken on documenting the existence of
> > SystemProperty ?
> > 
> > I like the idea of migrating documentation into embedded one.
> > 
> > I just wanted to add a note into https://s.apache.org/BPJ5 that alert
> > about SystemProperty, but i seem to miss the modification permission...
> > can someone grant me access ?
> > 
> > Thanks
> > 
> > Gil
> > 
> > 
> > Le 12:50 - vendredi 11 mai, Taher Alkhateeb a écrit :
> > > Actually, I think whatever need to be documented is best placed in our
> > > embedded documentation. We should probably consider freezing all new
> > > documentation in any place that is not the embedded documentation and try
> > > to migrate everything to it. So email setting docs could be placed
> > > somewhere in our user manual.
> > > 
> > > On Fri, May 11, 2018, 11:51 AM Jacques Le Roux 
> > > 
> > > wrote:
> > > 
> > > > Hi Rishi,
> > > > 
> > > > 
> > > > Le 09/05/2018 à 11:12, Rishi Solanki a écrit :
> > > > > Community, I think we should mention the SystemProperty where 
> > > > > required in
> > > > > Production Setup Guide or may be we can add version of production 
> > > > > setup
> > > > > guide which will tells user upto which release this production setup
> > > > guide
> > > > > will work. I know we discuss this kind of effort in past for all the
> > > > > documents and we agree on some point. But this is quicker to manage
> > > > > Production Setup Guide, if we agree then I can do it.
> > > > Yes good idea, a simple information for concerned versions in the 
> > > > current
> > > > Production Setup Guide fits with me
> > > > 
> > > > Jacques
> > > > > I'm fine with either change the existing one or maintain the version. 
> > > > > But
> > > > > first we should have one which works always with latest. Thanks!
> > > > > 
> > > > > 
> > > > > Rishi Solanki
> > > > > Sr Manager, Enterprise Software Development
> > > > > HotWax Systems Pvt. Ltd.
> > > > > Direct: +91-9893287847
> > > > > http://www.hotwaxsystems.com
> > > > > www.hotwax.co
> > > > > 
> > > > > On Wed, May 9, 2018 at 3:33 AM, i...@agentur-m3.de 
> > > > > 
> > > > > wrote:
> > > > > 
> > > > > > Hello,
> > > > > > 
> > > > > > here is a problem with my e-mail base-configuration.
> > > > > > 
> > > > > > I configured email according to the setup guide:
> > > > > > 
> > > > > > 
> > > > https://cwiki.apache.org/confluence/display/OFBIZ/Apache+OFBiz+Technical+
> > > > > > Production+Setup+Guide#ApacheOFBizTechnicalProduction
> > > > > > SetupGuide-EmailServerSettings
> > > > > > 
> > > > > > 
> > > > > > Unfortunately no email seems to be sent from server
> > > > > > (the send email button in partymgr works fine now (thanks to 
> > > > > > Jacques!),
> > > > > > but no email reaches client). No error message, no error in log.
> > > > > > 
> > > > > > Also I tried to register in the ecommerce system and send
> > > > > > an "Forgot Your Password" email, but none of the emails were sent.
> > > > > > 
> > > > > > To get more info about the problem, I wrote a groovy script and 
> > > > > > copied
> > > > > > parts of the sendEmail-code from EmailServices.java.
> > > > > > The script below surprisingly works fine and sends emails!
> > > > > > 
> > > > > > So I don't understand, why OFBiz itself does not send mails.
> > > > > > Is there any further configuration necessary?
> > > > > > 
> > > > > > 
> > > > > > 
> > > > > > The script (which sends mails):
> > > > > > 
> > > > > > import javax.mail.Session;
> > > > > > 
> > > > > > import javax.activation.DataHandler;
> > > > > > import javax.activation.DataSource;
> > > > > > import javax.mail.Message;
> > > > > > import javax.mail.MessagingException;
> > > > > > import javax.mail.SendFailedException;
> > > > > > import javax.mail.Session;
> > > > > > import javax.mail.Transport;
> > > > > > import javax.mail.internet.InternetAddress;
> > > > > > import javax.mail.internet.MimeBodyPart;
> > > > > > import javax.mail.internet.MimeMessage;
> > > > > > import javax.mail.internet.MimeMultipart;
> > > > > > import javax.xml.parsers.ParserConfigurationException;
> > > > > > import javax.xml.transform.stream.StreamSource;
> > > > > > 
> > > > > > import org.apache.fop.apps.Fop;
> > > > > > import org.apache.fop.apps.MimeConstants;
> > > > > > import org.apache.ofbiz.base.util.Debug;
> > > > > > import org.apache.ofbiz.base.util.GeneralException;
> > > > > > import org.apache.ofbiz.base.util.HttpClient;
> > > > > > import org.apache.ofbiz.base.util.HttpClientException;
> > > > > > import org.apache.ofbiz.base.util.UtilGenerics;
> > > > > > import org.apache.ofbiz.base.util.UtilMisc;
> > > > > > import org.apache.ofbiz.base.util.UtilProperties;
> > > > > > import org.apache.ofbiz.base.util.UtilValidate;
> > > > > > import org.apache.ofbiz.base.util.collections.MapStack

Re: Send E-Mails

2019-03-26 Thread Jacques Le Roux

Makes sense Pierre,

Please Gil checks https://issues.apache.org/jira/browse/INFRA-18028

HTH

Jacques

Le 26/03/2019 à 09:16, Pierre Smits a écrit :

Hi Gil,

Does this maybe have something to do with recent migration by INFRA to have
ApacheIds (LDAP)+password being usable as login credentials? I can't edit
either.

Best regards,

Pierre Smits

*Apache Trafodion , Vice President*
*Apache Directory , PMC Member*
Apache Incubator , committer
*Apache OFBiz ,  10 years a contributor without
privileges*
Apache Steve , committer


On Tue, Mar 26, 2019 at 8:56 AM Gil Portenseigne <
gil.portensei...@nereide.fr> wrote:


Hello there,

Do somes actions have been taken on documenting the existence of
SystemProperty ?

I like the idea of migrating documentation into embedded one.

I just wanted to add a note into https://s.apache.org/BPJ5 that alert
about SystemProperty, but i seem to miss the modification permission...
can someone grant me access ?

Thanks

Gil


Le 12:50 - vendredi 11 mai, Taher Alkhateeb a écrit :

Actually, I think whatever need to be documented is best placed in our
embedded documentation. We should probably consider freezing all new
documentation in any place that is not the embedded documentation and try
to migrate everything to it. So email setting docs could be placed
somewhere in our user manual.

On Fri, May 11, 2018, 11:51 AM Jacques Le Roux <

jacques.le.r...@les7arts.com>

wrote:


Hi Rishi,


Le 09/05/2018 ą 11:12, Rishi Solanki a écrit :

Community, I think we should mention the SystemProperty where

required in

Production Setup Guide or may be we can add version of production

setup

guide which will tells user upto which release this production setup

guide

will work. I know we discuss this kind of effort in past for all the
documents and we agree on some point. But this is quicker to manage
Production Setup Guide, if we agree then I can do it.

Yes good idea, a simple information for concerned versions in the

current

Production Setup Guide fits with me

Jacques

I'm fine with either change the existing one or maintain the

version. But

first we should have one which works always with latest. Thanks!


Rishi Solanki
Sr Manager, Enterprise Software Development
HotWax Systems Pvt. Ltd.
Direct: +91-9893287847
http://www.hotwaxsystems.com
www.hotwax.co

On Wed, May 9, 2018 at 3:33 AM, i...@agentur-m3.de <

i...@agentur-m3.de>

wrote:


Hello,

here is a problem with my e-mail base-configuration.

I configured email according to the setup guide:



https://cwiki.apache.org/confluence/display/OFBIZ/Apache+OFBiz+Technical+

Production+Setup+Guide#ApacheOFBizTechnicalProduction
SetupGuide-EmailServerSettings


Unfortunately no email seems to be sent from server
(the send email button in partymgr works fine now (thanks to

Jacques!),

but no email reaches client). No error message, no error in log.

Also I tried to register in the ecommerce system and send
an "Forgot Your Password" email, but none of the emails were sent.

To get more info about the problem, I wrote a groovy script and

copied

parts of the sendEmail-code from EmailServices.java.
The script below surprisingly works fine and sends emails!

So I don't understand, why OFBiz itself does not send mails.
Is there any further configuration necessary?



The script (which sends mails):

import javax.mail.Session;

import javax.activation.DataHandler;
import javax.activation.DataSource;
import javax.mail.Message;
import javax.mail.MessagingException;
import javax.mail.SendFailedException;
import javax.mail.Session;
import javax.mail.Transport;
import javax.mail.internet.InternetAddress;
import javax.mail.internet.MimeBodyPart;
import javax.mail.internet.MimeMessage;
import javax.mail.internet.MimeMultipart;
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.transform.stream.StreamSource;

import org.apache.fop.apps.Fop;
import org.apache.fop.apps.MimeConstants;
import org.apache.ofbiz.base.util.Debug;
import org.apache.ofbiz.base.util.GeneralException;
import org.apache.ofbiz.base.util.HttpClient;
import org.apache.ofbiz.base.util.HttpClientException;
import org.apache.ofbiz.base.util.UtilGenerics;
import org.apache.ofbiz.base.util.UtilMisc;
import org.apache.ofbiz.base.util.UtilProperties;
import org.apache.ofbiz.base.util.UtilValidate;
import org.apache.ofbiz.base.util.collections.MapStack;
import org.apache.ofbiz.base.util.string.FlexibleStringExpander;
import org.apache.ofbiz.entity.Delegator;
import org.apache.ofbiz.entity.GenericValue;
import org.apache.ofbiz.entity.util.EntityUtilProperties;
import org.apache.ofbiz.service.DispatchContext;
import org.apache.ofbiz.service.GenericServiceException;
import org.apache.ofbiz.service.LocalDispatcher;
import org.apache.ofbiz.service.ServiceUtil;
import org.apache.ofbiz.service.mail.MimeMessageWrapper;
import org.apache

Re: Send E-Mails

2019-03-26 Thread Jacques Le Roux

Hi Gil,

Let me check

Jacques

Le 26/03/2019 à 08:56, Gil Portenseigne a écrit :

Hello there,

Do somes actions have been taken on documenting the existence of
SystemProperty ?

I like the idea of migrating documentation into embedded one.

I just wanted to add a note into https://s.apache.org/BPJ5 that alert
about SystemProperty, but i seem to miss the modification permission...
can someone grant me access ?

Thanks

Gil


Le 12:50 - vendredi 11 mai, Taher Alkhateeb a écrit :

Actually, I think whatever need to be documented is best placed in our
embedded documentation. We should probably consider freezing all new
documentation in any place that is not the embedded documentation and try
to migrate everything to it. So email setting docs could be placed
somewhere in our user manual.

On Fri, May 11, 2018, 11:51 AM Jacques Le Roux 
wrote:


Hi Rishi,


Le 09/05/2018 à 11:12, Rishi Solanki a écrit :

Community, I think we should mention the SystemProperty where required in
Production Setup Guide or may be we can add version of production setup
guide which will tells user upto which release this production setup

guide

will work. I know we discuss this kind of effort in past for all the
documents and we agree on some point. But this is quicker to manage
Production Setup Guide, if we agree then I can do it.

Yes good idea, a simple information for concerned versions in the current
Production Setup Guide fits with me

Jacques

I'm fine with either change the existing one or maintain the version. But
first we should have one which works always with latest. Thanks!


Rishi Solanki
Sr Manager, Enterprise Software Development
HotWax Systems Pvt. Ltd.
Direct: +91-9893287847
http://www.hotwaxsystems.com
www.hotwax.co

On Wed, May 9, 2018 at 3:33 AM, i...@agentur-m3.de 
wrote:


Hello,

here is a problem with my e-mail base-configuration.

I configured email according to the setup guide:



https://cwiki.apache.org/confluence/display/OFBIZ/Apache+OFBiz+Technical+

Production+Setup+Guide#ApacheOFBizTechnicalProduction
SetupGuide-EmailServerSettings


Unfortunately no email seems to be sent from server
(the send email button in partymgr works fine now (thanks to Jacques!),
but no email reaches client). No error message, no error in log.

Also I tried to register in the ecommerce system and send
an "Forgot Your Password" email, but none of the emails were sent.

To get more info about the problem, I wrote a groovy script and copied
parts of the sendEmail-code from EmailServices.java.
The script below surprisingly works fine and sends emails!

So I don't understand, why OFBiz itself does not send mails.
Is there any further configuration necessary?



The script (which sends mails):

import javax.mail.Session;

import javax.activation.DataHandler;
import javax.activation.DataSource;
import javax.mail.Message;
import javax.mail.MessagingException;
import javax.mail.SendFailedException;
import javax.mail.Session;
import javax.mail.Transport;
import javax.mail.internet.InternetAddress;
import javax.mail.internet.MimeBodyPart;
import javax.mail.internet.MimeMessage;
import javax.mail.internet.MimeMultipart;
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.transform.stream.StreamSource;

import org.apache.fop.apps.Fop;
import org.apache.fop.apps.MimeConstants;
import org.apache.ofbiz.base.util.Debug;
import org.apache.ofbiz.base.util.GeneralException;
import org.apache.ofbiz.base.util.HttpClient;
import org.apache.ofbiz.base.util.HttpClientException;
import org.apache.ofbiz.base.util.UtilGenerics;
import org.apache.ofbiz.base.util.UtilMisc;
import org.apache.ofbiz.base.util.UtilProperties;
import org.apache.ofbiz.base.util.UtilValidate;
import org.apache.ofbiz.base.util.collections.MapStack;
import org.apache.ofbiz.base.util.string.FlexibleStringExpander;
import org.apache.ofbiz.entity.Delegator;
import org.apache.ofbiz.entity.GenericValue;
import org.apache.ofbiz.entity.util.EntityUtilProperties;
import org.apache.ofbiz.service.DispatchContext;
import org.apache.ofbiz.service.GenericServiceException;
import org.apache.ofbiz.service.LocalDispatcher;
import org.apache.ofbiz.service.ServiceUtil;
import org.apache.ofbiz.service.mail.MimeMessageWrapper;
import org.apache.ofbiz.webapp.view.ApacheFopWorker;
import org.apache.ofbiz.widget.renderer.macro.MacroScreenRenderer;
import org.apache.ofbiz.widget.renderer.ScreenRenderer;
import org.apache.ofbiz.widget.renderer.ScreenStringRenderer;
import org.xml.sax.SAXException;

def testMail() {
  sendType = "mail.smtp.host"
  sendVia = "smtp.myhost.com"
  Properties props = System.getProperties()
  props.put(sendType, sendVia)
  Session session
  session = Session.getInstance(props);
  MimeMessage mail
  mail = new MimeMessage(session);
  Transport trans = null
  sendFrom = "obfiz.example.com"
  sendTo = "m...@myserver.de"
  subject = "testMail from OFBiz"
  mp = new MimeMultipar

Re: Send E-Mails

2019-03-26 Thread Pierre Smits
Hi Gil,

Does this maybe have something to do with recent migration by INFRA to have
ApacheIds (LDAP)+password being usable as login credentials? I can't edit
either.

Best regards,

Pierre Smits

*Apache Trafodion , Vice President*
*Apache Directory , PMC Member*
Apache Incubator , committer
*Apache OFBiz ,  10 years a contributor without
privileges*
Apache Steve , committer


On Tue, Mar 26, 2019 at 8:56 AM Gil Portenseigne <
gil.portensei...@nereide.fr> wrote:

> Hello there,
>
> Do somes actions have been taken on documenting the existence of
> SystemProperty ?
>
> I like the idea of migrating documentation into embedded one.
>
> I just wanted to add a note into https://s.apache.org/BPJ5 that alert
> about SystemProperty, but i seem to miss the modification permission...
> can someone grant me access ?
>
> Thanks
>
> Gil
>
>
> Le 12:50 - vendredi 11 mai, Taher Alkhateeb a écrit :
> > Actually, I think whatever need to be documented is best placed in our
> > embedded documentation. We should probably consider freezing all new
> > documentation in any place that is not the embedded documentation and try
> > to migrate everything to it. So email setting docs could be placed
> > somewhere in our user manual.
> >
> > On Fri, May 11, 2018, 11:51 AM Jacques Le Roux <
> jacques.le.r...@les7arts.com>
> > wrote:
> >
> > > Hi Rishi,
> > >
> > >
> > > Le 09/05/2018 ą 11:12, Rishi Solanki a écrit :
> > > > Community, I think we should mention the SystemProperty where
> required in
> > > > Production Setup Guide or may be we can add version of production
> setup
> > > > guide which will tells user upto which release this production setup
> > > guide
> > > > will work. I know we discuss this kind of effort in past for all the
> > > > documents and we agree on some point. But this is quicker to manage
> > > > Production Setup Guide, if we agree then I can do it.
> > > Yes good idea, a simple information for concerned versions in the
> current
> > > Production Setup Guide fits with me
> > >
> > > Jacques
> > > >
> > > > I'm fine with either change the existing one or maintain the
> version. But
> > > > first we should have one which works always with latest. Thanks!
> > > >
> > > >
> > > > Rishi Solanki
> > > > Sr Manager, Enterprise Software Development
> > > > HotWax Systems Pvt. Ltd.
> > > > Direct: +91-9893287847
> > > > http://www.hotwaxsystems.com
> > > > www.hotwax.co
> > > >
> > > > On Wed, May 9, 2018 at 3:33 AM, i...@agentur-m3.de <
> i...@agentur-m3.de>
> > > > wrote:
> > > >
> > > >> Hello,
> > > >>
> > > >> here is a problem with my e-mail base-configuration.
> > > >>
> > > >> I configured email according to the setup guide:
> > > >>
> > > >>
> > >
> https://cwiki.apache.org/confluence/display/OFBIZ/Apache+OFBiz+Technical+
> > > >> Production+Setup+Guide#ApacheOFBizTechnicalProduction
> > > >> SetupGuide-EmailServerSettings
> > > >>
> > > >>
> > > >> Unfortunately no email seems to be sent from server
> > > >> (the send email button in partymgr works fine now (thanks to
> Jacques!),
> > > >> but no email reaches client). No error message, no error in log.
> > > >>
> > > >> Also I tried to register in the ecommerce system and send
> > > >> an "Forgot Your Password" email, but none of the emails were sent.
> > > >>
> > > >> To get more info about the problem, I wrote a groovy script and
> copied
> > > >> parts of the sendEmail-code from EmailServices.java.
> > > >> The script below surprisingly works fine and sends emails!
> > > >>
> > > >> So I don't understand, why OFBiz itself does not send mails.
> > > >> Is there any further configuration necessary?
> > > >>
> > > >>
> > > >>
> > > >> The script (which sends mails):
> > > >>
> > > >> import javax.mail.Session;
> > > >>
> > > >> import javax.activation.DataHandler;
> > > >> import javax.activation.DataSource;
> > > >> import javax.mail.Message;
> > > >> import javax.mail.MessagingException;
> > > >> import javax.mail.SendFailedException;
> > > >> import javax.mail.Session;
> > > >> import javax.mail.Transport;
> > > >> import javax.mail.internet.InternetAddress;
> > > >> import javax.mail.internet.MimeBodyPart;
> > > >> import javax.mail.internet.MimeMessage;
> > > >> import javax.mail.internet.MimeMultipart;
> > > >> import javax.xml.parsers.ParserConfigurationException;
> > > >> import javax.xml.transform.stream.StreamSource;
> > > >>
> > > >> import org.apache.fop.apps.Fop;
> > > >> import org.apache.fop.apps.MimeConstants;
> > > >> import org.apache.ofbiz.base.util.Debug;
> > > >> import org.apache.ofbiz.base.util.GeneralException;
> > > >> import org.apache.ofbiz.base.util.HttpClient;
> > > >> import org.apache.ofbiz.base.util.HttpClientException;
> > > >> import org.apache.ofbiz.base.util.UtilGenerics;
> > > >> import org.apache.ofbiz.base.util.UtilMisc;
> > > >> import org.apache.ofbiz.base.util.UtilProperti

Re: Send E-Mails

2019-03-26 Thread Gil Portenseigne
Hello there,

Do somes actions have been taken on documenting the existence of
SystemProperty ?

I like the idea of migrating documentation into embedded one.

I just wanted to add a note into https://s.apache.org/BPJ5 that alert
about SystemProperty, but i seem to miss the modification permission...
can someone grant me access ?

Thanks

Gil


Le 12:50 - vendredi 11 mai, Taher Alkhateeb a écrit :
> Actually, I think whatever need to be documented is best placed in our
> embedded documentation. We should probably consider freezing all new
> documentation in any place that is not the embedded documentation and try
> to migrate everything to it. So email setting docs could be placed
> somewhere in our user manual.
> 
> On Fri, May 11, 2018, 11:51 AM Jacques Le Roux 
> wrote:
> 
> > Hi Rishi,
> >
> >
> > Le 09/05/2018 à 11:12, Rishi Solanki a écrit :
> > > Community, I think we should mention the SystemProperty where required in
> > > Production Setup Guide or may be we can add version of production setup
> > > guide which will tells user upto which release this production setup
> > guide
> > > will work. I know we discuss this kind of effort in past for all the
> > > documents and we agree on some point. But this is quicker to manage
> > > Production Setup Guide, if we agree then I can do it.
> > Yes good idea, a simple information for concerned versions in the current
> > Production Setup Guide fits with me
> >
> > Jacques
> > >
> > > I'm fine with either change the existing one or maintain the version. But
> > > first we should have one which works always with latest. Thanks!
> > >
> > >
> > > Rishi Solanki
> > > Sr Manager, Enterprise Software Development
> > > HotWax Systems Pvt. Ltd.
> > > Direct: +91-9893287847
> > > http://www.hotwaxsystems.com
> > > www.hotwax.co
> > >
> > > On Wed, May 9, 2018 at 3:33 AM, i...@agentur-m3.de 
> > > wrote:
> > >
> > >> Hello,
> > >>
> > >> here is a problem with my e-mail base-configuration.
> > >>
> > >> I configured email according to the setup guide:
> > >>
> > >>
> > https://cwiki.apache.org/confluence/display/OFBIZ/Apache+OFBiz+Technical+
> > >> Production+Setup+Guide#ApacheOFBizTechnicalProduction
> > >> SetupGuide-EmailServerSettings
> > >>
> > >>
> > >> Unfortunately no email seems to be sent from server
> > >> (the send email button in partymgr works fine now (thanks to Jacques!),
> > >> but no email reaches client). No error message, no error in log.
> > >>
> > >> Also I tried to register in the ecommerce system and send
> > >> an "Forgot Your Password" email, but none of the emails were sent.
> > >>
> > >> To get more info about the problem, I wrote a groovy script and copied
> > >> parts of the sendEmail-code from EmailServices.java.
> > >> The script below surprisingly works fine and sends emails!
> > >>
> > >> So I don't understand, why OFBiz itself does not send mails.
> > >> Is there any further configuration necessary?
> > >>
> > >>
> > >>
> > >> The script (which sends mails):
> > >>
> > >> import javax.mail.Session;
> > >>
> > >> import javax.activation.DataHandler;
> > >> import javax.activation.DataSource;
> > >> import javax.mail.Message;
> > >> import javax.mail.MessagingException;
> > >> import javax.mail.SendFailedException;
> > >> import javax.mail.Session;
> > >> import javax.mail.Transport;
> > >> import javax.mail.internet.InternetAddress;
> > >> import javax.mail.internet.MimeBodyPart;
> > >> import javax.mail.internet.MimeMessage;
> > >> import javax.mail.internet.MimeMultipart;
> > >> import javax.xml.parsers.ParserConfigurationException;
> > >> import javax.xml.transform.stream.StreamSource;
> > >>
> > >> import org.apache.fop.apps.Fop;
> > >> import org.apache.fop.apps.MimeConstants;
> > >> import org.apache.ofbiz.base.util.Debug;
> > >> import org.apache.ofbiz.base.util.GeneralException;
> > >> import org.apache.ofbiz.base.util.HttpClient;
> > >> import org.apache.ofbiz.base.util.HttpClientException;
> > >> import org.apache.ofbiz.base.util.UtilGenerics;
> > >> import org.apache.ofbiz.base.util.UtilMisc;
> > >> import org.apache.ofbiz.base.util.UtilProperties;
> > >> import org.apache.ofbiz.base.util.UtilValidate;
> > >> import org.apache.ofbiz.base.util.collections.MapStack;
> > >> import org.apache.ofbiz.base.util.string.FlexibleStringExpander;
> > >> import org.apache.ofbiz.entity.Delegator;
> > >> import org.apache.ofbiz.entity.GenericValue;
> > >> import org.apache.ofbiz.entity.util.EntityUtilProperties;
> > >> import org.apache.ofbiz.service.DispatchContext;
> > >> import org.apache.ofbiz.service.GenericServiceException;
> > >> import org.apache.ofbiz.service.LocalDispatcher;
> > >> import org.apache.ofbiz.service.ServiceUtil;
> > >> import org.apache.ofbiz.service.mail.MimeMessageWrapper;
> > >> import org.apache.ofbiz.webapp.view.ApacheFopWorker;
> > >> import org.apache.ofbiz.widget.renderer.macro.MacroScreenRenderer;
> > >> import org.apache.ofbiz.widget.renderer.ScreenRenderer;
> > >> import org.apache.ofbiz.widget.rendere

Re: Send E-Mails

2018-05-11 Thread Taher Alkhateeb
Actually, I think whatever need to be documented is best placed in our
embedded documentation. We should probably consider freezing all new
documentation in any place that is not the embedded documentation and try
to migrate everything to it. So email setting docs could be placed
somewhere in our user manual.

On Fri, May 11, 2018, 11:51 AM Jacques Le Roux 
wrote:

> Hi Rishi,
>
>
> Le 09/05/2018 à 11:12, Rishi Solanki a écrit :
> > Community, I think we should mention the SystemProperty where required in
> > Production Setup Guide or may be we can add version of production setup
> > guide which will tells user upto which release this production setup
> guide
> > will work. I know we discuss this kind of effort in past for all the
> > documents and we agree on some point. But this is quicker to manage
> > Production Setup Guide, if we agree then I can do it.
> Yes good idea, a simple information for concerned versions in the current
> Production Setup Guide fits with me
>
> Jacques
> >
> > I'm fine with either change the existing one or maintain the version. But
> > first we should have one which works always with latest. Thanks!
> >
> >
> > Rishi Solanki
> > Sr Manager, Enterprise Software Development
> > HotWax Systems Pvt. Ltd.
> > Direct: +91-9893287847
> > http://www.hotwaxsystems.com
> > www.hotwax.co
> >
> > On Wed, May 9, 2018 at 3:33 AM, i...@agentur-m3.de 
> > wrote:
> >
> >> Hello,
> >>
> >> here is a problem with my e-mail base-configuration.
> >>
> >> I configured email according to the setup guide:
> >>
> >>
> https://cwiki.apache.org/confluence/display/OFBIZ/Apache+OFBiz+Technical+
> >> Production+Setup+Guide#ApacheOFBizTechnicalProduction
> >> SetupGuide-EmailServerSettings
> >>
> >>
> >> Unfortunately no email seems to be sent from server
> >> (the send email button in partymgr works fine now (thanks to Jacques!),
> >> but no email reaches client). No error message, no error in log.
> >>
> >> Also I tried to register in the ecommerce system and send
> >> an "Forgot Your Password" email, but none of the emails were sent.
> >>
> >> To get more info about the problem, I wrote a groovy script and copied
> >> parts of the sendEmail-code from EmailServices.java.
> >> The script below surprisingly works fine and sends emails!
> >>
> >> So I don't understand, why OFBiz itself does not send mails.
> >> Is there any further configuration necessary?
> >>
> >>
> >>
> >> The script (which sends mails):
> >>
> >> import javax.mail.Session;
> >>
> >> import javax.activation.DataHandler;
> >> import javax.activation.DataSource;
> >> import javax.mail.Message;
> >> import javax.mail.MessagingException;
> >> import javax.mail.SendFailedException;
> >> import javax.mail.Session;
> >> import javax.mail.Transport;
> >> import javax.mail.internet.InternetAddress;
> >> import javax.mail.internet.MimeBodyPart;
> >> import javax.mail.internet.MimeMessage;
> >> import javax.mail.internet.MimeMultipart;
> >> import javax.xml.parsers.ParserConfigurationException;
> >> import javax.xml.transform.stream.StreamSource;
> >>
> >> import org.apache.fop.apps.Fop;
> >> import org.apache.fop.apps.MimeConstants;
> >> import org.apache.ofbiz.base.util.Debug;
> >> import org.apache.ofbiz.base.util.GeneralException;
> >> import org.apache.ofbiz.base.util.HttpClient;
> >> import org.apache.ofbiz.base.util.HttpClientException;
> >> import org.apache.ofbiz.base.util.UtilGenerics;
> >> import org.apache.ofbiz.base.util.UtilMisc;
> >> import org.apache.ofbiz.base.util.UtilProperties;
> >> import org.apache.ofbiz.base.util.UtilValidate;
> >> import org.apache.ofbiz.base.util.collections.MapStack;
> >> import org.apache.ofbiz.base.util.string.FlexibleStringExpander;
> >> import org.apache.ofbiz.entity.Delegator;
> >> import org.apache.ofbiz.entity.GenericValue;
> >> import org.apache.ofbiz.entity.util.EntityUtilProperties;
> >> import org.apache.ofbiz.service.DispatchContext;
> >> import org.apache.ofbiz.service.GenericServiceException;
> >> import org.apache.ofbiz.service.LocalDispatcher;
> >> import org.apache.ofbiz.service.ServiceUtil;
> >> import org.apache.ofbiz.service.mail.MimeMessageWrapper;
> >> import org.apache.ofbiz.webapp.view.ApacheFopWorker;
> >> import org.apache.ofbiz.widget.renderer.macro.MacroScreenRenderer;
> >> import org.apache.ofbiz.widget.renderer.ScreenRenderer;
> >> import org.apache.ofbiz.widget.renderer.ScreenStringRenderer;
> >> import org.xml.sax.SAXException;
> >>
> >> def testMail() {
> >>  sendType = "mail.smtp.host"
> >>  sendVia = "smtp.myhost.com"
> >>  Properties props = System.getProperties()
> >>  props.put(sendType, sendVia)
> >>  Session session
> >>  session = Session.getInstance(props);
> >>  MimeMessage mail
> >>  mail = new MimeMessage(session);
> >>  Transport trans = null
> >>  sendFrom = "obfiz.example.com"
> >>  sendTo = "m...@myserver.de"
> >>  subject = "testMail from OFBiz"
> >>  mp = new MimeMultipart(

Re: Send E-Mails

2018-05-11 Thread Jacques Le Roux

Hi Rishi,


Le 09/05/2018 à 11:12, Rishi Solanki a écrit :

Community, I think we should mention the SystemProperty where required in
Production Setup Guide or may be we can add version of production setup
guide which will tells user upto which release this production setup guide
will work. I know we discuss this kind of effort in past for all the
documents and we agree on some point. But this is quicker to manage
Production Setup Guide, if we agree then I can do it.

Yes good idea, a simple information for concerned versions in the current 
Production Setup Guide fits with me

Jacques


I'm fine with either change the existing one or maintain the version. But
first we should have one which works always with latest. Thanks!


Rishi Solanki
Sr Manager, Enterprise Software Development
HotWax Systems Pvt. Ltd.
Direct: +91-9893287847
http://www.hotwaxsystems.com
www.hotwax.co

On Wed, May 9, 2018 at 3:33 AM, i...@agentur-m3.de 
wrote:


Hello,

here is a problem with my e-mail base-configuration.

I configured email according to the setup guide:

https://cwiki.apache.org/confluence/display/OFBIZ/Apache+OFBiz+Technical+
Production+Setup+Guide#ApacheOFBizTechnicalProduction
SetupGuide-EmailServerSettings


Unfortunately no email seems to be sent from server
(the send email button in partymgr works fine now (thanks to Jacques!),
but no email reaches client). No error message, no error in log.

Also I tried to register in the ecommerce system and send
an "Forgot Your Password" email, but none of the emails were sent.

To get more info about the problem, I wrote a groovy script and copied
parts of the sendEmail-code from EmailServices.java.
The script below surprisingly works fine and sends emails!

So I don't understand, why OFBiz itself does not send mails.
Is there any further configuration necessary?



The script (which sends mails):

import javax.mail.Session;

import javax.activation.DataHandler;
import javax.activation.DataSource;
import javax.mail.Message;
import javax.mail.MessagingException;
import javax.mail.SendFailedException;
import javax.mail.Session;
import javax.mail.Transport;
import javax.mail.internet.InternetAddress;
import javax.mail.internet.MimeBodyPart;
import javax.mail.internet.MimeMessage;
import javax.mail.internet.MimeMultipart;
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.transform.stream.StreamSource;

import org.apache.fop.apps.Fop;
import org.apache.fop.apps.MimeConstants;
import org.apache.ofbiz.base.util.Debug;
import org.apache.ofbiz.base.util.GeneralException;
import org.apache.ofbiz.base.util.HttpClient;
import org.apache.ofbiz.base.util.HttpClientException;
import org.apache.ofbiz.base.util.UtilGenerics;
import org.apache.ofbiz.base.util.UtilMisc;
import org.apache.ofbiz.base.util.UtilProperties;
import org.apache.ofbiz.base.util.UtilValidate;
import org.apache.ofbiz.base.util.collections.MapStack;
import org.apache.ofbiz.base.util.string.FlexibleStringExpander;
import org.apache.ofbiz.entity.Delegator;
import org.apache.ofbiz.entity.GenericValue;
import org.apache.ofbiz.entity.util.EntityUtilProperties;
import org.apache.ofbiz.service.DispatchContext;
import org.apache.ofbiz.service.GenericServiceException;
import org.apache.ofbiz.service.LocalDispatcher;
import org.apache.ofbiz.service.ServiceUtil;
import org.apache.ofbiz.service.mail.MimeMessageWrapper;
import org.apache.ofbiz.webapp.view.ApacheFopWorker;
import org.apache.ofbiz.widget.renderer.macro.MacroScreenRenderer;
import org.apache.ofbiz.widget.renderer.ScreenRenderer;
import org.apache.ofbiz.widget.renderer.ScreenStringRenderer;
import org.xml.sax.SAXException;

def testMail() {
 sendType = "mail.smtp.host"
 sendVia = "smtp.myhost.com"
 Properties props = System.getProperties()
 props.put(sendType, sendVia)
 Session session
 session = Session.getInstance(props);
 MimeMessage mail
 mail = new MimeMessage(session);
 Transport trans = null
 sendFrom = "obfiz.example.com"
 sendTo = "m...@myserver.de"
 subject = "testMail from OFBiz"
 mp = new MimeMultipart();

 MimeBodyPart mbp = new MimeBodyPart();
 mbp.setText("Content: a test mail from OFBiz system")

 mp.addBodyPart(mbp);
 mail.setContent(mp);

 mail.setFrom(new InternetAddress(sendFrom));
 mail.setSubject(subject, "UTF-8");
 mail.setHeader("X-Mailer", "Apache OFBiz, The Open For Business
Project");
 mail.setSentDate(new Date());
 mail.addRecipients(Message.RecipientType.TO, sendTo);

 trans = session.getTransport("smtp")
 authUser = UtilProperties.getPropertyValue('general.properties',
'mail.smtp.auth.user')
 authPass = UtilProperties.getPropertyValue('general.properties',
'mail.smtp.auth.password')

 trans.connect(sendVia, authUser, authPass);
 trans.sendMessage(mail, mail.getAllRecipients())
 trans.close()

 logWarning("successfu

Re: Send E-Mails

2018-05-09 Thread i...@agentur-m3.de
Hello,

I checked SystemProperty table: as you assumed, the auth-values where
empty. So I copied the values for some variables from general.properties:

  mail.smtp.auth.password
  mail.smtp.auth.user
  mail.smtp.relay.host

and set mail.notifications.enabled to Y
.

But still I do not receive an email.





Am 09.05.2018 um 11:12 schrieb Rishi Solanki:
> Hello,
> 
> Can you please check the SystemProperty records with
> systemResourceId="general". Possible reason seems these records may have
> empty values at your end. The db values used to override the
> general.properties file mentioned in the Production Setup Guide. Please add
> your configuration if it is missing and let us know if it works.
> 
> Community, I think we should mention the SystemProperty where required in
> Production Setup Guide or may be we can add version of production setup
> guide which will tells user upto which release this production setup guide
> will work. I know we discuss this kind of effort in past for all the
> documents and we agree on some point. But this is quicker to manage
> Production Setup Guide, if we agree then I can do it.
> 
> I'm fine with either change the existing one or maintain the version. But
> first we should have one which works always with latest. Thanks!
> 
> 
> Rishi Solanki
> Sr Manager, Enterprise Software Development
> HotWax Systems Pvt. Ltd.
> Direct: +91-9893287847
> http://www.hotwaxsystems.com
> www.hotwax.co
> 
> On Wed, May 9, 2018 at 3:33 AM, i...@agentur-m3.de 
> wrote:
> 
>> Hello,
>>
>> here is a problem with my e-mail base-configuration.
>>
>> I configured email according to the setup guide:
>>
>> https://cwiki.apache.org/confluence/display/OFBIZ/Apache+OFBiz+Technical+
>> Production+Setup+Guide#ApacheOFBizTechnicalProduction
>> SetupGuide-EmailServerSettings
>>
>>
>> Unfortunately no email seems to be sent from server
>> (the send email button in partymgr works fine now (thanks to Jacques!),
>> but no email reaches client). No error message, no error in log.
>>
>> Also I tried to register in the ecommerce system and send
>> an "Forgot Your Password" email, but none of the emails were sent.
>>
>> To get more info about the problem, I wrote a groovy script and copied
>> parts of the sendEmail-code from EmailServices.java.
>> The script below surprisingly works fine and sends emails!
>>
>> So I don't understand, why OFBiz itself does not send mails.
>> Is there any further configuration necessary?
>>
>>
>>
>> The script (which sends mails):
>>
>> import javax.mail.Session;
>>
>> import javax.activation.DataHandler;
>> import javax.activation.DataSource;
>> import javax.mail.Message;
>> import javax.mail.MessagingException;
>> import javax.mail.SendFailedException;
>> import javax.mail.Session;
>> import javax.mail.Transport;
>> import javax.mail.internet.InternetAddress;
>> import javax.mail.internet.MimeBodyPart;
>> import javax.mail.internet.MimeMessage;
>> import javax.mail.internet.MimeMultipart;
>> import javax.xml.parsers.ParserConfigurationException;
>> import javax.xml.transform.stream.StreamSource;
>>
>> import org.apache.fop.apps.Fop;
>> import org.apache.fop.apps.MimeConstants;
>> import org.apache.ofbiz.base.util.Debug;
>> import org.apache.ofbiz.base.util.GeneralException;
>> import org.apache.ofbiz.base.util.HttpClient;
>> import org.apache.ofbiz.base.util.HttpClientException;
>> import org.apache.ofbiz.base.util.UtilGenerics;
>> import org.apache.ofbiz.base.util.UtilMisc;
>> import org.apache.ofbiz.base.util.UtilProperties;
>> import org.apache.ofbiz.base.util.UtilValidate;
>> import org.apache.ofbiz.base.util.collections.MapStack;
>> import org.apache.ofbiz.base.util.string.FlexibleStringExpander;
>> import org.apache.ofbiz.entity.Delegator;
>> import org.apache.ofbiz.entity.GenericValue;
>> import org.apache.ofbiz.entity.util.EntityUtilProperties;
>> import org.apache.ofbiz.service.DispatchContext;
>> import org.apache.ofbiz.service.GenericServiceException;
>> import org.apache.ofbiz.service.LocalDispatcher;
>> import org.apache.ofbiz.service.ServiceUtil;
>> import org.apache.ofbiz.service.mail.MimeMessageWrapper;
>> import org.apache.ofbiz.webapp.view.ApacheFopWorker;
>> import org.apache.ofbiz.widget.renderer.macro.MacroScreenRenderer;
>> import org.apache.ofbiz.widget.renderer.ScreenRenderer;
>> import org.apache.ofbiz.widget.renderer.ScreenStringRenderer;
>> import org.xml.sax.SAXException;
>>
>> def testMail() {
>> sendType = "mail.smtp.host"
>> sendVia = "smtp.myhost.com"
>> Properties props = System.getProperties()
>> props.put(sendType, sendVia)
>> Session session
>> session = Session.getInstance(props);
>> MimeMessage mail
>> mail = new MimeMessage(session);
>> Transport trans = null
>> sendFrom = "obfiz.example.com"
>> sendTo = "m...@myserver.de"
>> subject = "testMail from OFBiz"
>> mp = new MimeMultipart();
>>
>> MimeBodyPart mbp = new MimeBodyPart();
>> mbp.set

Re: Send E-Mails

2018-05-09 Thread Rishi Solanki
Hello,

Can you please check the SystemProperty records with
systemResourceId="general". Possible reason seems these records may have
empty values at your end. The db values used to override the
general.properties file mentioned in the Production Setup Guide. Please add
your configuration if it is missing and let us know if it works.

Community, I think we should mention the SystemProperty where required in
Production Setup Guide or may be we can add version of production setup
guide which will tells user upto which release this production setup guide
will work. I know we discuss this kind of effort in past for all the
documents and we agree on some point. But this is quicker to manage
Production Setup Guide, if we agree then I can do it.

I'm fine with either change the existing one or maintain the version. But
first we should have one which works always with latest. Thanks!


Rishi Solanki
Sr Manager, Enterprise Software Development
HotWax Systems Pvt. Ltd.
Direct: +91-9893287847
http://www.hotwaxsystems.com
www.hotwax.co

On Wed, May 9, 2018 at 3:33 AM, i...@agentur-m3.de 
wrote:

> Hello,
>
> here is a problem with my e-mail base-configuration.
>
> I configured email according to the setup guide:
>
> https://cwiki.apache.org/confluence/display/OFBIZ/Apache+OFBiz+Technical+
> Production+Setup+Guide#ApacheOFBizTechnicalProduction
> SetupGuide-EmailServerSettings
>
>
> Unfortunately no email seems to be sent from server
> (the send email button in partymgr works fine now (thanks to Jacques!),
> but no email reaches client). No error message, no error in log.
>
> Also I tried to register in the ecommerce system and send
> an "Forgot Your Password" email, but none of the emails were sent.
>
> To get more info about the problem, I wrote a groovy script and copied
> parts of the sendEmail-code from EmailServices.java.
> The script below surprisingly works fine and sends emails!
>
> So I don't understand, why OFBiz itself does not send mails.
> Is there any further configuration necessary?
>
>
>
> The script (which sends mails):
>
> import javax.mail.Session;
>
> import javax.activation.DataHandler;
> import javax.activation.DataSource;
> import javax.mail.Message;
> import javax.mail.MessagingException;
> import javax.mail.SendFailedException;
> import javax.mail.Session;
> import javax.mail.Transport;
> import javax.mail.internet.InternetAddress;
> import javax.mail.internet.MimeBodyPart;
> import javax.mail.internet.MimeMessage;
> import javax.mail.internet.MimeMultipart;
> import javax.xml.parsers.ParserConfigurationException;
> import javax.xml.transform.stream.StreamSource;
>
> import org.apache.fop.apps.Fop;
> import org.apache.fop.apps.MimeConstants;
> import org.apache.ofbiz.base.util.Debug;
> import org.apache.ofbiz.base.util.GeneralException;
> import org.apache.ofbiz.base.util.HttpClient;
> import org.apache.ofbiz.base.util.HttpClientException;
> import org.apache.ofbiz.base.util.UtilGenerics;
> import org.apache.ofbiz.base.util.UtilMisc;
> import org.apache.ofbiz.base.util.UtilProperties;
> import org.apache.ofbiz.base.util.UtilValidate;
> import org.apache.ofbiz.base.util.collections.MapStack;
> import org.apache.ofbiz.base.util.string.FlexibleStringExpander;
> import org.apache.ofbiz.entity.Delegator;
> import org.apache.ofbiz.entity.GenericValue;
> import org.apache.ofbiz.entity.util.EntityUtilProperties;
> import org.apache.ofbiz.service.DispatchContext;
> import org.apache.ofbiz.service.GenericServiceException;
> import org.apache.ofbiz.service.LocalDispatcher;
> import org.apache.ofbiz.service.ServiceUtil;
> import org.apache.ofbiz.service.mail.MimeMessageWrapper;
> import org.apache.ofbiz.webapp.view.ApacheFopWorker;
> import org.apache.ofbiz.widget.renderer.macro.MacroScreenRenderer;
> import org.apache.ofbiz.widget.renderer.ScreenRenderer;
> import org.apache.ofbiz.widget.renderer.ScreenStringRenderer;
> import org.xml.sax.SAXException;
>
> def testMail() {
> sendType = "mail.smtp.host"
> sendVia = "smtp.myhost.com"
> Properties props = System.getProperties()
> props.put(sendType, sendVia)
> Session session
> session = Session.getInstance(props);
> MimeMessage mail
> mail = new MimeMessage(session);
> Transport trans = null
> sendFrom = "obfiz.example.com"
> sendTo = "m...@myserver.de"
> subject = "testMail from OFBiz"
> mp = new MimeMultipart();
>
> MimeBodyPart mbp = new MimeBodyPart();
> mbp.setText("Content: a test mail from OFBiz system")
>
> mp.addBodyPart(mbp);
> mail.setContent(mp);
>
> mail.setFrom(new InternetAddress(sendFrom));
> mail.setSubject(subject, "UTF-8");
> mail.setHeader("X-Mailer", "Apache OFBiz, The Open For Business
> Project");
> mail.setSentDate(new Date());
> mail.addRecipients(Message.RecipientType.TO, sendTo);
>
> trans = session.getTransport("smtp")
> authUser = UtilProperties.getPropertyVa

Re: Send E-Mails

2018-05-09 Thread Jacques Le Roux

Thanks for report, I committed the fix for OFBIZ-7075

I confirm it seems there is an issue. I configured general.properties to be 
able to send an email. All seems to work

2018-05-09 10:13:11,370 |jsse-nio-8443-exec-8 |ControlServlet    |T| [[[sendCommunicationEvent(Domain:https://localhost)] Request Begun, 
encoding=[UTF-8]- total:0.0,since last(Begin):0.0]]
2018-05-09 10:13:11,377 |jsse-nio-8443-exec-8 |ServiceDispatcher |T| Sync service [partymgr/partyCommunicationEventPermissionCheck] 
finished in [1] milliseconds

2018-05-09 10:13:11,403 |jsse-nio-8443-exec-8 |ModelService  
|I| Set default value [N] for parameter [setRoleStatusToComplete]
2018-05-09 10:13:11,404 |jsse-nio-8443-exec-8 |ServiceDispatcher |T| Sync service [partymgr/partyCommunicationEventPermissionCheck] 
finished in [1] milliseconds
2018-05-09 10:13:11,425 |jsse-nio-8443-exec-8 |ServiceDispatcher |T| Sync service [partymgr/setCommunicationEventStatus] finished in [22] 
milliseconds
2018-05-09 10:13:11,425 |jsse-nio-8443-exec-8 |ServiceEcaRule    |I| For Service ECA [updateCommunicationEvent] on [commit] got false for 
condition: [statusId][equals][COM_ENTERED][true][String]
2018-05-09 10:13:11,425 |jsse-nio-8443-exec-8 |ServiceEcaRule    |I| For Service ECA [updateCommunicationEvent] on [commit] got false for 
condition: [statusId][equals][COM_ENTERED][true][String]
2018-05-09 10:13:11,425 |jsse-nio-8443-exec-8 |ServiceEcaRule    |I| For Service ECA [updateCommunicationEvent] on [commit] got false for 
condition: [statusId][equals][COM_ENTERED][true][String]
2018-05-09 10:13:11,425 |jsse-nio-8443-exec-8 |ServiceEcaCondition   |I| To Field (oldStatusId) is not found in context for 
updateCommunicationEvent, defaulting to null.
2018-05-09 10:13:11,426 |jsse-nio-8443-exec-8 |ServiceEcaRule    |I| Running Service ECA Service: updateCommStatusFromCommEvent, triggered 
by rule on Service: updateCommunicationEvent
2018-05-09 10:13:11,448 |jsse-nio-8443-exec-8 |ServiceDispatcher |T| Sync service [partymgr/updateCommStatusFromCommEvent] finished in 
[22] milliseconds
2018-05-09 10:13:11,448 |jsse-nio-8443-exec-8 |ServiceDispatcher |T| Sync service [partymgr/updateCommunicationEvent] finished in [72] 
milliseconds
2018-05-09 10:13:11,448 |jsse-nio-8443-exec-8 |RequestHandler    |I| Ran Event [service:#updateCommunicationEvent] from [request], result 
is [success]

2018-05-09 10:13:11,449 |jsse-nio-8443-exec-8 |RequestHandler    
|I| Rendering View [EditCommunicationEvent].  Hidden sessionId by default.
2018-05-09 10:13:11,452 |jsse-nio-8443-exec-8 |ServiceDispatcher |T| Sync service [partymgr/getUserPreferenceGroup] finished in [2] 
milliseconds
2018-05-09 10:13:11,462 |jsse-nio-8443-exec-8 |ScreenFactory |I| Got 28 screens in 0.009s from: 
file:/C:/projectsASF/ofbiz/applications/party/widget/partymgr/CommunicationEventScreens.xml
2018-05-09 10:13:11,500 |jsse-nio-8443-exec-8 |ScreenFactory |I| Got 4 screens in 0.005s from: 
file:/C:/projectsASF/ofbiz/applications/party/widget/partymgr/CommonScreens.xml
2018-05-09 10:13:11,506 |jsse-nio-8443-exec-8 |ScreenFactory |I| Got 1 screens in 0.005s from: 
file:/C:/projectsASF/ofbiz/applications/commonext/widget/CommonScreens.xml
2018-05-09 10:13:11,544 |jsse-nio-8443-exec-8 |ServiceDispatcher |T| Sync service [partymgr/getLastSystemInfoNote] finished in [11] 
milliseconds
2018-05-09 10:13:11,614 |jsse-nio-8443-exec-8 |Log   |W| [CommonPermissionServices.xml#genericBasePermissionCheck line 59] 
This simple-method-call is deprecated! Please use a service-call of genericBasePermissionCheck instead.
2018-05-09 10:13:11,615 |jsse-nio-8443-exec-8 |ServiceDispatcher |T| Sync service [partymgr/genericBasePermissionCheck] finished in [1] 
milliseconds
2018-05-09 10:13:11,615 |jsse-nio-8443-exec-8 |ServiceEcaRule    |I| For Service ECA [partyBasePermissionCheck] on [return] got false for 
condition: [hasPermission][equals][false][true][Boolean]
2018-05-09 10:13:11,615 |jsse-nio-8443-exec-8 |ServiceDispatcher |T| Sync service [partymgr/partyBasePermissionCheck] finished in [6] 
milliseconds

2018-05-09 10:13:11,895 |jsse-nio-8443-exec-8 |ServerHitBin  
|I| Visit delegatorName=default, ServerHitBin delegatorName=default
2018-05-09 10:13:11,900 |jsse-nio-8443-exec-8 |ControlServlet    |T| [[[sendCommunicationEvent(Domain:https://localhost)] Request Done- 
total:0.53,since last([sendCommunicatio...):0.53]]


But I did not receive an email.

I'll try to have a look when I get a chance...

Jacques

Le 09/05/2018 à 00:03, i...@agentur-m3.de a écrit :

Hello,

here is a problem with my e-mail base-configuration.

I configured email according to the setup guide:

https://cwiki.apache.org/confluenc

Send E-Mails

2018-05-08 Thread i...@agentur-m3.de
Hello,

here is a problem with my e-mail base-configuration.

I configured email according to the setup guide:

https://cwiki.apache.org/confluence/display/OFBIZ/Apache+OFBiz+Technical+Production+Setup+Guide#ApacheOFBizTechnicalProductionSetupGuide-EmailServerSettings


Unfortunately no email seems to be sent from server
(the send email button in partymgr works fine now (thanks to Jacques!),
but no email reaches client). No error message, no error in log.

Also I tried to register in the ecommerce system and send
an "Forgot Your Password" email, but none of the emails were sent.

To get more info about the problem, I wrote a groovy script and copied
parts of the sendEmail-code from EmailServices.java.
The script below surprisingly works fine and sends emails!

So I don't understand, why OFBiz itself does not send mails.
Is there any further configuration necessary?



The script (which sends mails):

import javax.mail.Session;

import javax.activation.DataHandler;
import javax.activation.DataSource;
import javax.mail.Message;
import javax.mail.MessagingException;
import javax.mail.SendFailedException;
import javax.mail.Session;
import javax.mail.Transport;
import javax.mail.internet.InternetAddress;
import javax.mail.internet.MimeBodyPart;
import javax.mail.internet.MimeMessage;
import javax.mail.internet.MimeMultipart;
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.transform.stream.StreamSource;

import org.apache.fop.apps.Fop;
import org.apache.fop.apps.MimeConstants;
import org.apache.ofbiz.base.util.Debug;
import org.apache.ofbiz.base.util.GeneralException;
import org.apache.ofbiz.base.util.HttpClient;
import org.apache.ofbiz.base.util.HttpClientException;
import org.apache.ofbiz.base.util.UtilGenerics;
import org.apache.ofbiz.base.util.UtilMisc;
import org.apache.ofbiz.base.util.UtilProperties;
import org.apache.ofbiz.base.util.UtilValidate;
import org.apache.ofbiz.base.util.collections.MapStack;
import org.apache.ofbiz.base.util.string.FlexibleStringExpander;
import org.apache.ofbiz.entity.Delegator;
import org.apache.ofbiz.entity.GenericValue;
import org.apache.ofbiz.entity.util.EntityUtilProperties;
import org.apache.ofbiz.service.DispatchContext;
import org.apache.ofbiz.service.GenericServiceException;
import org.apache.ofbiz.service.LocalDispatcher;
import org.apache.ofbiz.service.ServiceUtil;
import org.apache.ofbiz.service.mail.MimeMessageWrapper;
import org.apache.ofbiz.webapp.view.ApacheFopWorker;
import org.apache.ofbiz.widget.renderer.macro.MacroScreenRenderer;
import org.apache.ofbiz.widget.renderer.ScreenRenderer;
import org.apache.ofbiz.widget.renderer.ScreenStringRenderer;
import org.xml.sax.SAXException;

def testMail() {
sendType = "mail.smtp.host"
sendVia = "smtp.myhost.com"
Properties props = System.getProperties()
props.put(sendType, sendVia)
Session session
session = Session.getInstance(props);
MimeMessage mail
mail = new MimeMessage(session);
Transport trans = null
sendFrom = "obfiz.example.com"
sendTo = "m...@myserver.de"
subject = "testMail from OFBiz"
mp = new MimeMultipart();

MimeBodyPart mbp = new MimeBodyPart();
mbp.setText("Content: a test mail from OFBiz system")

mp.addBodyPart(mbp);
mail.setContent(mp);

mail.setFrom(new InternetAddress(sendFrom));
mail.setSubject(subject, "UTF-8");
mail.setHeader("X-Mailer", "Apache OFBiz, The Open For Business 
Project");
mail.setSentDate(new Date());
mail.addRecipients(Message.RecipientType.TO, sendTo);

trans = session.getTransport("smtp")
authUser = UtilProperties.getPropertyValue('general.properties',
'mail.smtp.auth.user')
authPass = UtilProperties.getPropertyValue('general.properties',
'mail.smtp.auth.password')

trans.connect(sendVia, authUser, authPass);
trans.sendMessage(mail, mail.getAllRecipients())
trans.close()

logWarning("successful run of testMail ")
logWarning(" user = " + userLogin.partyId);

return success("this test is done successful")  
}