You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by "Fabien Carrion (JIRA)" <ji...@apache.org> on 2007/09/19 05:18:43 UTC

[jira] Created: (OFBIZ-1256) Send mail through gmail with the javamail api in ofbiz

Send mail through gmail with the javamail api in ofbiz
------------------------------------------------------

                 Key: OFBIZ-1256
                 URL: https://issues.apache.org/jira/browse/OFBIZ-1256
             Project: OFBiz
          Issue Type: New Feature
    Affects Versions: SVN trunk
         Environment: All
            Reporter: Fabien Carrion
            Priority: Minor
             Fix For: Release Branch 4.0


This a small patch to accept ssl connections to smtp servers.

Index: content/src/org/ofbiz/content/email/EmailServices.java
===================================================================
--- content/src/org/ofbiz/content/email/EmailServices.java      (revision 576503)
+++ content/src/org/ofbiz/content/email/EmailServices.java      (working copy)
@@ -129,6 +129,8 @@
 
         String sendFrom = (String) context.get("sendFrom");
         String sendType = (String) context.get("sendType");
+        String port = (String) context.get("port");
+        String ssl = (String) context.get("ssl");
         String sendVia = (String) context.get("sendVia");
         String authUser = (String) context.get("authUser");
         String authPass = (String) context.get("authPass");
@@ -151,6 +153,12 @@
             if (authUser != null && authUser.length() > 0) {
                 useSmtpAuth = true;
             }
+            if (port == null || port.length() == 0) {
+                port = UtilProperties.getPropertyValue("general.properties", "mail.smtp.port", "25");
+            }
+            if (ssl == null || ssl.length() == 0) {
+                ssl = UtilProperties.getPropertyValue("general.properties", "mail.smtp.ssl", "javax.net.ssl.SSLSocketFactory");
+            }
         } else if (sendVia == null) {
             return ServiceUtil.returnError("Parameter sendVia is required when sendType is not mail.smtp.host");
         }
@@ -168,6 +176,14 @@
         try {
             Properties props = System.getProperties();
             props.put(sendType, sendVia);
+           if (port != null && port.length() > 0) {
+               props.put("mail.smtp.port", port);
+               props.put("mail.smtp.socketFactory.port", port);
+           }
+           if (ssl != null && ssl.length() > 0) {
+               props.put("mail.smtp.socketFactory.class", ssl);
+               props.put("mail.smtp.socketFactory.fallback", "false");
+           }
             if (useSmtpAuth) {
                 props.put("mail.smtp.auth", "true");
             }


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (OFBIZ-1256) Send mail through gmail with the javamail api in ofbiz

Posted by "Jacques Le Roux (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-1256?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12554238 ] 

Jacques Le Roux commented on OFBIZ-1256:
----------------------------------------

Chris,

I wonder why you have uncommented 
    mail.smtp.auth.user=
    mail.smtp.auth.password=
in your patch ?

And I'm not sure we want 
    mail.notifications.enabled=Y
by default


> Send mail through gmail with the javamail api in ofbiz
> ------------------------------------------------------
>
>                 Key: OFBIZ-1256
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1256
>             Project: OFBiz
>          Issue Type: New Feature
>          Components: content
>    Affects Versions: SVN trunk
>         Environment: All
>            Reporter: Fabien Carrion
>            Assignee: Jacques Le Roux
>            Priority: Minor
>             Fix For: SVN trunk
>
>         Attachments: emailssl_diff.patch, gmail.patch
>
>
> This a small patch to accept ssl connections to smtp servers.
> Index: content/src/org/ofbiz/content/email/EmailServices.java
> ===================================================================
> --- content/src/org/ofbiz/content/email/EmailServices.java      (revision 576503)
> +++ content/src/org/ofbiz/content/email/EmailServices.java      (working copy)
> @@ -129,6 +129,8 @@
>  
>          String sendFrom = (String) context.get("sendFrom");
>          String sendType = (String) context.get("sendType");
> +        String port = (String) context.get("port");
> +        String ssl = (String) context.get("ssl");
>          String sendVia = (String) context.get("sendVia");
>          String authUser = (String) context.get("authUser");
>          String authPass = (String) context.get("authPass");
> @@ -151,6 +153,12 @@
>              if (authUser != null && authUser.length() > 0) {
>                  useSmtpAuth = true;
>              }
> +            if (port == null || port.length() == 0) {
> +                port = UtilProperties.getPropertyValue("general.properties", "mail.smtp.port", "25");
> +            }
> +            if (ssl == null || ssl.length() == 0) {
> +                ssl = UtilProperties.getPropertyValue("general.properties", "mail.smtp.ssl", "javax.net.ssl.SSLSocketFactory");
> +            }
>          } else if (sendVia == null) {
>              return ServiceUtil.returnError("Parameter sendVia is required when sendType is not mail.smtp.host");
>          }
> @@ -168,6 +176,14 @@
>          try {
>              Properties props = System.getProperties();
>              props.put(sendType, sendVia);
> +           if (port != null && port.length() > 0) {
> +               props.put("mail.smtp.port", port);
> +               props.put("mail.smtp.socketFactory.port", port);
> +           }
> +           if (ssl != null && ssl.length() > 0) {
> +               props.put("mail.smtp.socketFactory.class", ssl);
> +               props.put("mail.smtp.socketFactory.fallback", "false");
> +           }
>              if (useSmtpAuth) {
>                  props.put("mail.smtp.auth", "true");
>              }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (OFBIZ-1256) Send mail through gmail with the javamail api in ofbiz

Posted by "Jacques Le Roux (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-1256?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12532908 ] 

Jacques Le Roux commented on OFBIZ-1256:
----------------------------------------

I would prefer a file than to have to copy a comment and create a file but at least this patch is near the good format (but I had also to indent + lines and the path begin in applications and not root)

Eventually, I was not able to merge it : outdated...

> Send mail through gmail with the javamail api in ofbiz
> ------------------------------------------------------
>
>                 Key: OFBIZ-1256
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1256
>             Project: OFBiz
>          Issue Type: New Feature
>    Affects Versions: SVN trunk
>         Environment: All
>            Reporter: Fabien Carrion
>            Priority: Minor
>             Fix For: Release Branch 4.0
>
>
> This a small patch to accept ssl connections to smtp servers.
> Index: content/src/org/ofbiz/content/email/EmailServices.java
> ===================================================================
> --- content/src/org/ofbiz/content/email/EmailServices.java      (revision 576503)
> +++ content/src/org/ofbiz/content/email/EmailServices.java      (working copy)
> @@ -129,6 +129,8 @@
>  
>          String sendFrom = (String) context.get("sendFrom");
>          String sendType = (String) context.get("sendType");
> +        String port = (String) context.get("port");
> +        String ssl = (String) context.get("ssl");
>          String sendVia = (String) context.get("sendVia");
>          String authUser = (String) context.get("authUser");
>          String authPass = (String) context.get("authPass");
> @@ -151,6 +153,12 @@
>              if (authUser != null && authUser.length() > 0) {
>                  useSmtpAuth = true;
>              }
> +            if (port == null || port.length() == 0) {
> +                port = UtilProperties.getPropertyValue("general.properties", "mail.smtp.port", "25");
> +            }
> +            if (ssl == null || ssl.length() == 0) {
> +                ssl = UtilProperties.getPropertyValue("general.properties", "mail.smtp.ssl", "javax.net.ssl.SSLSocketFactory");
> +            }
>          } else if (sendVia == null) {
>              return ServiceUtil.returnError("Parameter sendVia is required when sendType is not mail.smtp.host");
>          }
> @@ -168,6 +176,14 @@
>          try {
>              Properties props = System.getProperties();
>              props.put(sendType, sendVia);
> +           if (port != null && port.length() > 0) {
> +               props.put("mail.smtp.port", port);
> +               props.put("mail.smtp.socketFactory.port", port);
> +           }
> +           if (ssl != null && ssl.length() > 0) {
> +               props.put("mail.smtp.socketFactory.class", ssl);
> +               props.put("mail.smtp.socketFactory.fallback", "false");
> +           }
>              if (useSmtpAuth) {
>                  props.put("mail.smtp.auth", "true");
>              }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (OFBIZ-1256) Send mail through gmail with the javamail api in ofbiz

Posted by "BJ Freeman (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-1256?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12549779 ] 

BJ Freeman commented on OFBIZ-1256:
-----------------------------------

not sure you want to wait
but I am submitting a patch to he javamail container that allows multiple email accounts for SMTP that is searched by email from


> Send mail through gmail with the javamail api in ofbiz
> ------------------------------------------------------
>
>                 Key: OFBIZ-1256
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1256
>             Project: OFBiz
>          Issue Type: New Feature
>    Affects Versions: SVN trunk
>         Environment: All
>            Reporter: Fabien Carrion
>            Assignee: Jacques Le Roux
>            Priority: Minor
>             Fix For: SVN trunk
>
>         Attachments: emailssl_diff.patch
>
>
> This a small patch to accept ssl connections to smtp servers.
> Index: content/src/org/ofbiz/content/email/EmailServices.java
> ===================================================================
> --- content/src/org/ofbiz/content/email/EmailServices.java      (revision 576503)
> +++ content/src/org/ofbiz/content/email/EmailServices.java      (working copy)
> @@ -129,6 +129,8 @@
>  
>          String sendFrom = (String) context.get("sendFrom");
>          String sendType = (String) context.get("sendType");
> +        String port = (String) context.get("port");
> +        String ssl = (String) context.get("ssl");
>          String sendVia = (String) context.get("sendVia");
>          String authUser = (String) context.get("authUser");
>          String authPass = (String) context.get("authPass");
> @@ -151,6 +153,12 @@
>              if (authUser != null && authUser.length() > 0) {
>                  useSmtpAuth = true;
>              }
> +            if (port == null || port.length() == 0) {
> +                port = UtilProperties.getPropertyValue("general.properties", "mail.smtp.port", "25");
> +            }
> +            if (ssl == null || ssl.length() == 0) {
> +                ssl = UtilProperties.getPropertyValue("general.properties", "mail.smtp.ssl", "javax.net.ssl.SSLSocketFactory");
> +            }
>          } else if (sendVia == null) {
>              return ServiceUtil.returnError("Parameter sendVia is required when sendType is not mail.smtp.host");
>          }
> @@ -168,6 +176,14 @@
>          try {
>              Properties props = System.getProperties();
>              props.put(sendType, sendVia);
> +           if (port != null && port.length() > 0) {
> +               props.put("mail.smtp.port", port);
> +               props.put("mail.smtp.socketFactory.port", port);
> +           }
> +           if (ssl != null && ssl.length() > 0) {
> +               props.put("mail.smtp.socketFactory.class", ssl);
> +               props.put("mail.smtp.socketFactory.fallback", "false");
> +           }
>              if (useSmtpAuth) {
>                  props.put("mail.smtp.auth", "true");
>              }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (OFBIZ-1256) Send mail through gmail with the javamail api in ofbiz

Posted by "Jacques Le Roux (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-1256?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12554309 ] 

Jacques Le Roux commented on OFBIZ-1256:
----------------------------------------

Thanks for update Chris, I will have a look soon.

BJ, I understand your POV, but I think we don't need to put this information there (as you did for PayPal) since it is well documented in production setup guide and obvious in general.properties file, thanks for comment.

> Send mail through gmail with the javamail api in ofbiz
> ------------------------------------------------------
>
>                 Key: OFBIZ-1256
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1256
>             Project: OFBiz
>          Issue Type: New Feature
>          Components: content
>    Affects Versions: SVN trunk
>         Environment: All
>            Reporter: Fabien Carrion
>            Assignee: Jacques Le Roux
>            Priority: Minor
>             Fix For: SVN trunk
>
>         Attachments: emailssl_diff.patch, gmail.patch
>
>
> This a small patch to accept ssl connections to smtp servers.
> Index: content/src/org/ofbiz/content/email/EmailServices.java
> ===================================================================
> --- content/src/org/ofbiz/content/email/EmailServices.java      (revision 576503)
> +++ content/src/org/ofbiz/content/email/EmailServices.java      (working copy)
> @@ -129,6 +129,8 @@
>  
>          String sendFrom = (String) context.get("sendFrom");
>          String sendType = (String) context.get("sendType");
> +        String port = (String) context.get("port");
> +        String ssl = (String) context.get("ssl");
>          String sendVia = (String) context.get("sendVia");
>          String authUser = (String) context.get("authUser");
>          String authPass = (String) context.get("authPass");
> @@ -151,6 +153,12 @@
>              if (authUser != null && authUser.length() > 0) {
>                  useSmtpAuth = true;
>              }
> +            if (port == null || port.length() == 0) {
> +                port = UtilProperties.getPropertyValue("general.properties", "mail.smtp.port", "25");
> +            }
> +            if (ssl == null || ssl.length() == 0) {
> +                ssl = UtilProperties.getPropertyValue("general.properties", "mail.smtp.ssl", "javax.net.ssl.SSLSocketFactory");
> +            }
>          } else if (sendVia == null) {
>              return ServiceUtil.returnError("Parameter sendVia is required when sendType is not mail.smtp.host");
>          }
> @@ -168,6 +176,14 @@
>          try {
>              Properties props = System.getProperties();
>              props.put(sendType, sendVia);
> +           if (port != null && port.length() > 0) {
> +               props.put("mail.smtp.port", port);
> +               props.put("mail.smtp.socketFactory.port", port);
> +           }
> +           if (ssl != null && ssl.length() > 0) {
> +               props.put("mail.smtp.socketFactory.class", ssl);
> +               props.put("mail.smtp.socketFactory.fallback", "false");
> +           }
>              if (useSmtpAuth) {
>                  props.put("mail.smtp.auth", "true");
>              }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (OFBIZ-1256) Send mail through gmail with the javamail api in ofbiz

Posted by "Chris Howe (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OFBIZ-1256?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Chris Howe updated OFBIZ-1256:
------------------------------

    Attachment: gmail.patch

> Send mail through gmail with the javamail api in ofbiz
> ------------------------------------------------------
>
>                 Key: OFBIZ-1256
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1256
>             Project: OFBiz
>          Issue Type: New Feature
>          Components: content
>    Affects Versions: SVN trunk
>         Environment: All
>            Reporter: Fabien Carrion
>            Assignee: Jacques Le Roux
>            Priority: Minor
>             Fix For: SVN trunk
>
>         Attachments: emailssl_diff.patch, gmail.patch
>
>
> This a small patch to accept ssl connections to smtp servers.
> Index: content/src/org/ofbiz/content/email/EmailServices.java
> ===================================================================
> --- content/src/org/ofbiz/content/email/EmailServices.java      (revision 576503)
> +++ content/src/org/ofbiz/content/email/EmailServices.java      (working copy)
> @@ -129,6 +129,8 @@
>  
>          String sendFrom = (String) context.get("sendFrom");
>          String sendType = (String) context.get("sendType");
> +        String port = (String) context.get("port");
> +        String ssl = (String) context.get("ssl");
>          String sendVia = (String) context.get("sendVia");
>          String authUser = (String) context.get("authUser");
>          String authPass = (String) context.get("authPass");
> @@ -151,6 +153,12 @@
>              if (authUser != null && authUser.length() > 0) {
>                  useSmtpAuth = true;
>              }
> +            if (port == null || port.length() == 0) {
> +                port = UtilProperties.getPropertyValue("general.properties", "mail.smtp.port", "25");
> +            }
> +            if (ssl == null || ssl.length() == 0) {
> +                ssl = UtilProperties.getPropertyValue("general.properties", "mail.smtp.ssl", "javax.net.ssl.SSLSocketFactory");
> +            }
>          } else if (sendVia == null) {
>              return ServiceUtil.returnError("Parameter sendVia is required when sendType is not mail.smtp.host");
>          }
> @@ -168,6 +176,14 @@
>          try {
>              Properties props = System.getProperties();
>              props.put(sendType, sendVia);
> +           if (port != null && port.length() > 0) {
> +               props.put("mail.smtp.port", port);
> +               props.put("mail.smtp.socketFactory.port", port);
> +           }
> +           if (ssl != null && ssl.length() > 0) {
> +               props.put("mail.smtp.socketFactory.class", ssl);
> +               props.put("mail.smtp.socketFactory.fallback", "false");
> +           }
>              if (useSmtpAuth) {
>                  props.put("mail.smtp.auth", "true");
>              }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (OFBIZ-1256) Send mail through gmail with the javamail api in ofbiz

Posted by "Fabien Carrion (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OFBIZ-1256?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Fabien Carrion updated OFBIZ-1256:
----------------------------------

    Attachment:     (was: emailssl_diff.patch.gz)

> Send mail through gmail with the javamail api in ofbiz
> ------------------------------------------------------
>
>                 Key: OFBIZ-1256
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1256
>             Project: OFBiz
>          Issue Type: New Feature
>    Affects Versions: SVN trunk
>         Environment: All
>            Reporter: Fabien Carrion
>            Priority: Minor
>             Fix For: SVN trunk
>
>         Attachments: emailssl_diff.patch
>
>
> This a small patch to accept ssl connections to smtp servers.
> Index: content/src/org/ofbiz/content/email/EmailServices.java
> ===================================================================
> --- content/src/org/ofbiz/content/email/EmailServices.java      (revision 576503)
> +++ content/src/org/ofbiz/content/email/EmailServices.java      (working copy)
> @@ -129,6 +129,8 @@
>  
>          String sendFrom = (String) context.get("sendFrom");
>          String sendType = (String) context.get("sendType");
> +        String port = (String) context.get("port");
> +        String ssl = (String) context.get("ssl");
>          String sendVia = (String) context.get("sendVia");
>          String authUser = (String) context.get("authUser");
>          String authPass = (String) context.get("authPass");
> @@ -151,6 +153,12 @@
>              if (authUser != null && authUser.length() > 0) {
>                  useSmtpAuth = true;
>              }
> +            if (port == null || port.length() == 0) {
> +                port = UtilProperties.getPropertyValue("general.properties", "mail.smtp.port", "25");
> +            }
> +            if (ssl == null || ssl.length() == 0) {
> +                ssl = UtilProperties.getPropertyValue("general.properties", "mail.smtp.ssl", "javax.net.ssl.SSLSocketFactory");
> +            }
>          } else if (sendVia == null) {
>              return ServiceUtil.returnError("Parameter sendVia is required when sendType is not mail.smtp.host");
>          }
> @@ -168,6 +176,14 @@
>          try {
>              Properties props = System.getProperties();
>              props.put(sendType, sendVia);
> +           if (port != null && port.length() > 0) {
> +               props.put("mail.smtp.port", port);
> +               props.put("mail.smtp.socketFactory.port", port);
> +           }
> +           if (ssl != null && ssl.length() > 0) {
> +               props.put("mail.smtp.socketFactory.class", ssl);
> +               props.put("mail.smtp.socketFactory.fallback", "false");
> +           }
>              if (useSmtpAuth) {
>                  props.put("mail.smtp.auth", "true");
>              }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (OFBIZ-1256) Send mail through gmail with the javamail api in ofbiz

Posted by "Chris Howe (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-1256?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12554263 ] 

Chris Howe commented on OFBIZ-1256:
-----------------------------------

woops..going too fast...i also had smtp.gmail.com as the default mail server.  I'll fix it here in a bit

> Send mail through gmail with the javamail api in ofbiz
> ------------------------------------------------------
>
>                 Key: OFBIZ-1256
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1256
>             Project: OFBiz
>          Issue Type: New Feature
>          Components: content
>    Affects Versions: SVN trunk
>         Environment: All
>            Reporter: Fabien Carrion
>            Assignee: Jacques Le Roux
>            Priority: Minor
>             Fix For: SVN trunk
>
>         Attachments: emailssl_diff.patch, gmail.patch
>
>
> This a small patch to accept ssl connections to smtp servers.
> Index: content/src/org/ofbiz/content/email/EmailServices.java
> ===================================================================
> --- content/src/org/ofbiz/content/email/EmailServices.java      (revision 576503)
> +++ content/src/org/ofbiz/content/email/EmailServices.java      (working copy)
> @@ -129,6 +129,8 @@
>  
>          String sendFrom = (String) context.get("sendFrom");
>          String sendType = (String) context.get("sendType");
> +        String port = (String) context.get("port");
> +        String ssl = (String) context.get("ssl");
>          String sendVia = (String) context.get("sendVia");
>          String authUser = (String) context.get("authUser");
>          String authPass = (String) context.get("authPass");
> @@ -151,6 +153,12 @@
>              if (authUser != null && authUser.length() > 0) {
>                  useSmtpAuth = true;
>              }
> +            if (port == null || port.length() == 0) {
> +                port = UtilProperties.getPropertyValue("general.properties", "mail.smtp.port", "25");
> +            }
> +            if (ssl == null || ssl.length() == 0) {
> +                ssl = UtilProperties.getPropertyValue("general.properties", "mail.smtp.ssl", "javax.net.ssl.SSLSocketFactory");
> +            }
>          } else if (sendVia == null) {
>              return ServiceUtil.returnError("Parameter sendVia is required when sendType is not mail.smtp.host");
>          }
> @@ -168,6 +176,14 @@
>          try {
>              Properties props = System.getProperties();
>              props.put(sendType, sendVia);
> +           if (port != null && port.length() > 0) {
> +               props.put("mail.smtp.port", port);
> +               props.put("mail.smtp.socketFactory.port", port);
> +           }
> +           if (ssl != null && ssl.length() > 0) {
> +               props.put("mail.smtp.socketFactory.class", ssl);
> +               props.put("mail.smtp.socketFactory.fallback", "false");
> +           }
>              if (useSmtpAuth) {
>                  props.put("mail.smtp.auth", "true");
>              }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (OFBIZ-1256) Send mail through gmail with the javamail api in ofbiz

Posted by "Jacques Le Roux (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OFBIZ-1256?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jacques Le Roux reassigned OFBIZ-1256:
--------------------------------------

    Assignee: Jacques Le Roux

> Send mail through gmail with the javamail api in ofbiz
> ------------------------------------------------------
>
>                 Key: OFBIZ-1256
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1256
>             Project: OFBiz
>          Issue Type: New Feature
>    Affects Versions: SVN trunk
>         Environment: All
>            Reporter: Fabien Carrion
>            Assignee: Jacques Le Roux
>            Priority: Minor
>             Fix For: SVN trunk
>
>         Attachments: emailssl_diff.patch
>
>
> This a small patch to accept ssl connections to smtp servers.
> Index: content/src/org/ofbiz/content/email/EmailServices.java
> ===================================================================
> --- content/src/org/ofbiz/content/email/EmailServices.java      (revision 576503)
> +++ content/src/org/ofbiz/content/email/EmailServices.java      (working copy)
> @@ -129,6 +129,8 @@
>  
>          String sendFrom = (String) context.get("sendFrom");
>          String sendType = (String) context.get("sendType");
> +        String port = (String) context.get("port");
> +        String ssl = (String) context.get("ssl");
>          String sendVia = (String) context.get("sendVia");
>          String authUser = (String) context.get("authUser");
>          String authPass = (String) context.get("authPass");
> @@ -151,6 +153,12 @@
>              if (authUser != null && authUser.length() > 0) {
>                  useSmtpAuth = true;
>              }
> +            if (port == null || port.length() == 0) {
> +                port = UtilProperties.getPropertyValue("general.properties", "mail.smtp.port", "25");
> +            }
> +            if (ssl == null || ssl.length() == 0) {
> +                ssl = UtilProperties.getPropertyValue("general.properties", "mail.smtp.ssl", "javax.net.ssl.SSLSocketFactory");
> +            }
>          } else if (sendVia == null) {
>              return ServiceUtil.returnError("Parameter sendVia is required when sendType is not mail.smtp.host");
>          }
> @@ -168,6 +176,14 @@
>          try {
>              Properties props = System.getProperties();
>              props.put(sendType, sendVia);
> +           if (port != null && port.length() > 0) {
> +               props.put("mail.smtp.port", port);
> +               props.put("mail.smtp.socketFactory.port", port);
> +           }
> +           if (ssl != null && ssl.length() > 0) {
> +               props.put("mail.smtp.socketFactory.class", ssl);
> +               props.put("mail.smtp.socketFactory.fallback", "false");
> +           }
>              if (useSmtpAuth) {
>                  props.put("mail.smtp.auth", "true");
>              }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (OFBIZ-1256) Send mail through gmail with the javamail api in ofbiz

Posted by "BJ Freeman (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-1256?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12554046 ] 

BJ Freeman commented on OFBIZ-1256:
-----------------------------------

If you wish to put this patch in for expendency then let it be so.
however the answer is no.

> Send mail through gmail with the javamail api in ofbiz
> ------------------------------------------------------
>
>                 Key: OFBIZ-1256
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1256
>             Project: OFBiz
>          Issue Type: New Feature
>          Components: content
>    Affects Versions: SVN trunk
>         Environment: All
>            Reporter: Fabien Carrion
>            Assignee: Jacques Le Roux
>            Priority: Minor
>             Fix For: SVN trunk
>
>         Attachments: emailssl_diff.patch, gmail.patch
>
>
> This a small patch to accept ssl connections to smtp servers.
> Index: content/src/org/ofbiz/content/email/EmailServices.java
> ===================================================================
> --- content/src/org/ofbiz/content/email/EmailServices.java      (revision 576503)
> +++ content/src/org/ofbiz/content/email/EmailServices.java      (working copy)
> @@ -129,6 +129,8 @@
>  
>          String sendFrom = (String) context.get("sendFrom");
>          String sendType = (String) context.get("sendType");
> +        String port = (String) context.get("port");
> +        String ssl = (String) context.get("ssl");
>          String sendVia = (String) context.get("sendVia");
>          String authUser = (String) context.get("authUser");
>          String authPass = (String) context.get("authPass");
> @@ -151,6 +153,12 @@
>              if (authUser != null && authUser.length() > 0) {
>                  useSmtpAuth = true;
>              }
> +            if (port == null || port.length() == 0) {
> +                port = UtilProperties.getPropertyValue("general.properties", "mail.smtp.port", "25");
> +            }
> +            if (ssl == null || ssl.length() == 0) {
> +                ssl = UtilProperties.getPropertyValue("general.properties", "mail.smtp.ssl", "javax.net.ssl.SSLSocketFactory");
> +            }
>          } else if (sendVia == null) {
>              return ServiceUtil.returnError("Parameter sendVia is required when sendType is not mail.smtp.host");
>          }
> @@ -168,6 +176,14 @@
>          try {
>              Properties props = System.getProperties();
>              props.put(sendType, sendVia);
> +           if (port != null && port.length() > 0) {
> +               props.put("mail.smtp.port", port);
> +               props.put("mail.smtp.socketFactory.port", port);
> +           }
> +           if (ssl != null && ssl.length() > 0) {
> +               props.put("mail.smtp.socketFactory.class", ssl);
> +               props.put("mail.smtp.socketFactory.fallback", "false");
> +           }
>              if (useSmtpAuth) {
>                  props.put("mail.smtp.auth", "true");
>              }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (OFBIZ-1256) Send mail through gmail with the javamail api in ofbiz

Posted by "Marco Risaliti (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OFBIZ-1256?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Marco Risaliti updated OFBIZ-1256:
----------------------------------

    Component/s: content

> Send mail through gmail with the javamail api in ofbiz
> ------------------------------------------------------
>
>                 Key: OFBIZ-1256
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1256
>             Project: OFBiz
>          Issue Type: New Feature
>          Components: content
>    Affects Versions: SVN trunk
>         Environment: All
>            Reporter: Fabien Carrion
>            Assignee: Jacques Le Roux
>            Priority: Minor
>             Fix For: SVN trunk
>
>         Attachments: emailssl_diff.patch
>
>
> This a small patch to accept ssl connections to smtp servers.
> Index: content/src/org/ofbiz/content/email/EmailServices.java
> ===================================================================
> --- content/src/org/ofbiz/content/email/EmailServices.java      (revision 576503)
> +++ content/src/org/ofbiz/content/email/EmailServices.java      (working copy)
> @@ -129,6 +129,8 @@
>  
>          String sendFrom = (String) context.get("sendFrom");
>          String sendType = (String) context.get("sendType");
> +        String port = (String) context.get("port");
> +        String ssl = (String) context.get("ssl");
>          String sendVia = (String) context.get("sendVia");
>          String authUser = (String) context.get("authUser");
>          String authPass = (String) context.get("authPass");
> @@ -151,6 +153,12 @@
>              if (authUser != null && authUser.length() > 0) {
>                  useSmtpAuth = true;
>              }
> +            if (port == null || port.length() == 0) {
> +                port = UtilProperties.getPropertyValue("general.properties", "mail.smtp.port", "25");
> +            }
> +            if (ssl == null || ssl.length() == 0) {
> +                ssl = UtilProperties.getPropertyValue("general.properties", "mail.smtp.ssl", "javax.net.ssl.SSLSocketFactory");
> +            }
>          } else if (sendVia == null) {
>              return ServiceUtil.returnError("Parameter sendVia is required when sendType is not mail.smtp.host");
>          }
> @@ -168,6 +176,14 @@
>          try {
>              Properties props = System.getProperties();
>              props.put(sendType, sendVia);
> +           if (port != null && port.length() > 0) {
> +               props.put("mail.smtp.port", port);
> +               props.put("mail.smtp.socketFactory.port", port);
> +           }
> +           if (ssl != null && ssl.length() > 0) {
> +               props.put("mail.smtp.socketFactory.class", ssl);
> +               props.put("mail.smtp.socketFactory.fallback", "false");
> +           }
>              if (useSmtpAuth) {
>                  props.put("mail.smtp.auth", "true");
>              }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (OFBIZ-1256) Send mail through gmail with the javamail api in ofbiz

Posted by "BJ Freeman (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-1256?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12549839 ] 

BJ Freeman commented on OFBIZ-1256:
-----------------------------------

https://issues.apache.org/jira/browse/OFBIZ-65

> Send mail through gmail with the javamail api in ofbiz
> ------------------------------------------------------
>
>                 Key: OFBIZ-1256
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1256
>             Project: OFBiz
>          Issue Type: New Feature
>    Affects Versions: SVN trunk
>         Environment: All
>            Reporter: Fabien Carrion
>            Assignee: Jacques Le Roux
>            Priority: Minor
>             Fix For: SVN trunk
>
>         Attachments: emailssl_diff.patch
>
>
> This a small patch to accept ssl connections to smtp servers.
> Index: content/src/org/ofbiz/content/email/EmailServices.java
> ===================================================================
> --- content/src/org/ofbiz/content/email/EmailServices.java      (revision 576503)
> +++ content/src/org/ofbiz/content/email/EmailServices.java      (working copy)
> @@ -129,6 +129,8 @@
>  
>          String sendFrom = (String) context.get("sendFrom");
>          String sendType = (String) context.get("sendType");
> +        String port = (String) context.get("port");
> +        String ssl = (String) context.get("ssl");
>          String sendVia = (String) context.get("sendVia");
>          String authUser = (String) context.get("authUser");
>          String authPass = (String) context.get("authPass");
> @@ -151,6 +153,12 @@
>              if (authUser != null && authUser.length() > 0) {
>                  useSmtpAuth = true;
>              }
> +            if (port == null || port.length() == 0) {
> +                port = UtilProperties.getPropertyValue("general.properties", "mail.smtp.port", "25");
> +            }
> +            if (ssl == null || ssl.length() == 0) {
> +                ssl = UtilProperties.getPropertyValue("general.properties", "mail.smtp.ssl", "javax.net.ssl.SSLSocketFactory");
> +            }
>          } else if (sendVia == null) {
>              return ServiceUtil.returnError("Parameter sendVia is required when sendType is not mail.smtp.host");
>          }
> @@ -168,6 +176,14 @@
>          try {
>              Properties props = System.getProperties();
>              props.put(sendType, sendVia);
> +           if (port != null && port.length() > 0) {
> +               props.put("mail.smtp.port", port);
> +               props.put("mail.smtp.socketFactory.port", port);
> +           }
> +           if (ssl != null && ssl.length() > 0) {
> +               props.put("mail.smtp.socketFactory.class", ssl);
> +               props.put("mail.smtp.socketFactory.fallback", "false");
> +           }
>              if (useSmtpAuth) {
>                  props.put("mail.smtp.auth", "true");
>              }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (OFBIZ-1256) Send mail through gmail with the javamail api in ofbiz

Posted by "Chris Howe (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-1256?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12553901 ] 

Chris Howe commented on OFBIZ-1256:
-----------------------------------

First, good job Fabien!

Four minor things on this
1)port = UtilProperties.getPropertyValue("general.properties", "mail.smtp.port", "25"); 
   this should not have a default value.  While smtp's default port is indeed 25, the default value should remain handled by the Transport

2)ssl = UtilProperties.getPropertyValue("general.properties", "mail.smtp.ssl", "javax.net.ssl.SSLSocketFactory"); 
   this should not have a default value.  While this is the default ssl socket for JavaMail currently, we need to allow JavaMail to set this in the event of an improvement or change.

maybe:
3)props.put("mail.smtp.socketFactory.port", port); 
   Since JavaMail considers mail.smtp.socketFactory.port and mail.smtp.port as separate variables, perhaps we should as well

maybe:
4)http://www.javaworld.com/javatips/jw-javatip115.html claims that we need to add a provider :
  Security.addProvider( new com.sun.net.ssl.internal.ssl.Provider()); to the java security or add it dynamically in this method.  I don't know if we already have it included through the other things going on in OFBiz, but we may want to add it again here dynamically. 

I'm attaching the diff to general.properties that would be required if these four points are considered

> Send mail through gmail with the javamail api in ofbiz
> ------------------------------------------------------
>
>                 Key: OFBIZ-1256
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1256
>             Project: OFBiz
>          Issue Type: New Feature
>          Components: content
>    Affects Versions: SVN trunk
>         Environment: All
>            Reporter: Fabien Carrion
>            Assignee: Jacques Le Roux
>            Priority: Minor
>             Fix For: SVN trunk
>
>         Attachments: emailssl_diff.patch, gmail.patch
>
>
> This a small patch to accept ssl connections to smtp servers.
> Index: content/src/org/ofbiz/content/email/EmailServices.java
> ===================================================================
> --- content/src/org/ofbiz/content/email/EmailServices.java      (revision 576503)
> +++ content/src/org/ofbiz/content/email/EmailServices.java      (working copy)
> @@ -129,6 +129,8 @@
>  
>          String sendFrom = (String) context.get("sendFrom");
>          String sendType = (String) context.get("sendType");
> +        String port = (String) context.get("port");
> +        String ssl = (String) context.get("ssl");
>          String sendVia = (String) context.get("sendVia");
>          String authUser = (String) context.get("authUser");
>          String authPass = (String) context.get("authPass");
> @@ -151,6 +153,12 @@
>              if (authUser != null && authUser.length() > 0) {
>                  useSmtpAuth = true;
>              }
> +            if (port == null || port.length() == 0) {
> +                port = UtilProperties.getPropertyValue("general.properties", "mail.smtp.port", "25");
> +            }
> +            if (ssl == null || ssl.length() == 0) {
> +                ssl = UtilProperties.getPropertyValue("general.properties", "mail.smtp.ssl", "javax.net.ssl.SSLSocketFactory");
> +            }
>          } else if (sendVia == null) {
>              return ServiceUtil.returnError("Parameter sendVia is required when sendType is not mail.smtp.host");
>          }
> @@ -168,6 +176,14 @@
>          try {
>              Properties props = System.getProperties();
>              props.put(sendType, sendVia);
> +           if (port != null && port.length() > 0) {
> +               props.put("mail.smtp.port", port);
> +               props.put("mail.smtp.socketFactory.port", port);
> +           }
> +           if (ssl != null && ssl.length() > 0) {
> +               props.put("mail.smtp.socketFactory.class", ssl);
> +               props.put("mail.smtp.socketFactory.fallback", "false");
> +           }
>              if (useSmtpAuth) {
>                  props.put("mail.smtp.auth", "true");
>              }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (OFBIZ-1256) Send mail through gmail with the javamail api in ofbiz

Posted by "Jacques Le Roux (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-1256?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12549820 ] 

Jacques Le Roux commented on OFBIZ-1256:
----------------------------------------

Which is the Jira issue number please ?

> Send mail through gmail with the javamail api in ofbiz
> ------------------------------------------------------
>
>                 Key: OFBIZ-1256
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1256
>             Project: OFBiz
>          Issue Type: New Feature
>    Affects Versions: SVN trunk
>         Environment: All
>            Reporter: Fabien Carrion
>            Assignee: Jacques Le Roux
>            Priority: Minor
>             Fix For: SVN trunk
>
>         Attachments: emailssl_diff.patch
>
>
> This a small patch to accept ssl connections to smtp servers.
> Index: content/src/org/ofbiz/content/email/EmailServices.java
> ===================================================================
> --- content/src/org/ofbiz/content/email/EmailServices.java      (revision 576503)
> +++ content/src/org/ofbiz/content/email/EmailServices.java      (working copy)
> @@ -129,6 +129,8 @@
>  
>          String sendFrom = (String) context.get("sendFrom");
>          String sendType = (String) context.get("sendType");
> +        String port = (String) context.get("port");
> +        String ssl = (String) context.get("ssl");
>          String sendVia = (String) context.get("sendVia");
>          String authUser = (String) context.get("authUser");
>          String authPass = (String) context.get("authPass");
> @@ -151,6 +153,12 @@
>              if (authUser != null && authUser.length() > 0) {
>                  useSmtpAuth = true;
>              }
> +            if (port == null || port.length() == 0) {
> +                port = UtilProperties.getPropertyValue("general.properties", "mail.smtp.port", "25");
> +            }
> +            if (ssl == null || ssl.length() == 0) {
> +                ssl = UtilProperties.getPropertyValue("general.properties", "mail.smtp.ssl", "javax.net.ssl.SSLSocketFactory");
> +            }
>          } else if (sendVia == null) {
>              return ServiceUtil.returnError("Parameter sendVia is required when sendType is not mail.smtp.host");
>          }
> @@ -168,6 +176,14 @@
>          try {
>              Properties props = System.getProperties();
>              props.put(sendType, sendVia);
> +           if (port != null && port.length() > 0) {
> +               props.put("mail.smtp.port", port);
> +               props.put("mail.smtp.socketFactory.port", port);
> +           }
> +           if (ssl != null && ssl.length() > 0) {
> +               props.put("mail.smtp.socketFactory.class", ssl);
> +               props.put("mail.smtp.socketFactory.fallback", "false");
> +           }
>              if (useSmtpAuth) {
>                  props.put("mail.smtp.auth", "true");
>              }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (OFBIZ-1256) Send mail through gmail with the javamail api in ofbiz

Posted by "Jacques Le Roux (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OFBIZ-1256?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jacques Le Roux updated OFBIZ-1256:
-----------------------------------

    Fix Version/s:     (was: Release Branch 4.0)
                   SVN trunk

Actually I guess it's not outdated but because it does not respect the indentation. Also new features can't go to release but trunk.

> Send mail through gmail with the javamail api in ofbiz
> ------------------------------------------------------
>
>                 Key: OFBIZ-1256
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1256
>             Project: OFBiz
>          Issue Type: New Feature
>    Affects Versions: SVN trunk
>         Environment: All
>            Reporter: Fabien Carrion
>            Priority: Minor
>             Fix For: SVN trunk
>
>
> This a small patch to accept ssl connections to smtp servers.
> Index: content/src/org/ofbiz/content/email/EmailServices.java
> ===================================================================
> --- content/src/org/ofbiz/content/email/EmailServices.java      (revision 576503)
> +++ content/src/org/ofbiz/content/email/EmailServices.java      (working copy)
> @@ -129,6 +129,8 @@
>  
>          String sendFrom = (String) context.get("sendFrom");
>          String sendType = (String) context.get("sendType");
> +        String port = (String) context.get("port");
> +        String ssl = (String) context.get("ssl");
>          String sendVia = (String) context.get("sendVia");
>          String authUser = (String) context.get("authUser");
>          String authPass = (String) context.get("authPass");
> @@ -151,6 +153,12 @@
>              if (authUser != null && authUser.length() > 0) {
>                  useSmtpAuth = true;
>              }
> +            if (port == null || port.length() == 0) {
> +                port = UtilProperties.getPropertyValue("general.properties", "mail.smtp.port", "25");
> +            }
> +            if (ssl == null || ssl.length() == 0) {
> +                ssl = UtilProperties.getPropertyValue("general.properties", "mail.smtp.ssl", "javax.net.ssl.SSLSocketFactory");
> +            }
>          } else if (sendVia == null) {
>              return ServiceUtil.returnError("Parameter sendVia is required when sendType is not mail.smtp.host");
>          }
> @@ -168,6 +176,14 @@
>          try {
>              Properties props = System.getProperties();
>              props.put(sendType, sendVia);
> +           if (port != null && port.length() > 0) {
> +               props.put("mail.smtp.port", port);
> +               props.put("mail.smtp.socketFactory.port", port);
> +           }
> +           if (ssl != null && ssl.length() > 0) {
> +               props.put("mail.smtp.socketFactory.class", ssl);
> +               props.put("mail.smtp.socketFactory.fallback", "false");
> +           }
>              if (useSmtpAuth) {
>                  props.put("mail.smtp.auth", "true");
>              }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (OFBIZ-1256) Send mail through gmail with the javamail api in ofbiz

Posted by "BJ Freeman (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-1256?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12554054 ] 

BJ Freeman commented on OFBIZ-1256:
-----------------------------------

it is not variables but design
the design that goes with the mutiple will replace all this and in a different sequence.
for instance the structure that stores this into is already in the smtp format.

eventually it will be part of the contactmech electronic address



> Send mail through gmail with the javamail api in ofbiz
> ------------------------------------------------------
>
>                 Key: OFBIZ-1256
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1256
>             Project: OFBiz
>          Issue Type: New Feature
>          Components: content
>    Affects Versions: SVN trunk
>         Environment: All
>            Reporter: Fabien Carrion
>            Assignee: Jacques Le Roux
>            Priority: Minor
>             Fix For: SVN trunk
>
>         Attachments: emailssl_diff.patch, gmail.patch
>
>
> This a small patch to accept ssl connections to smtp servers.
> Index: content/src/org/ofbiz/content/email/EmailServices.java
> ===================================================================
> --- content/src/org/ofbiz/content/email/EmailServices.java      (revision 576503)
> +++ content/src/org/ofbiz/content/email/EmailServices.java      (working copy)
> @@ -129,6 +129,8 @@
>  
>          String sendFrom = (String) context.get("sendFrom");
>          String sendType = (String) context.get("sendType");
> +        String port = (String) context.get("port");
> +        String ssl = (String) context.get("ssl");
>          String sendVia = (String) context.get("sendVia");
>          String authUser = (String) context.get("authUser");
>          String authPass = (String) context.get("authPass");
> @@ -151,6 +153,12 @@
>              if (authUser != null && authUser.length() > 0) {
>                  useSmtpAuth = true;
>              }
> +            if (port == null || port.length() == 0) {
> +                port = UtilProperties.getPropertyValue("general.properties", "mail.smtp.port", "25");
> +            }
> +            if (ssl == null || ssl.length() == 0) {
> +                ssl = UtilProperties.getPropertyValue("general.properties", "mail.smtp.ssl", "javax.net.ssl.SSLSocketFactory");
> +            }
>          } else if (sendVia == null) {
>              return ServiceUtil.returnError("Parameter sendVia is required when sendType is not mail.smtp.host");
>          }
> @@ -168,6 +176,14 @@
>          try {
>              Properties props = System.getProperties();
>              props.put(sendType, sendVia);
> +           if (port != null && port.length() > 0) {
> +               props.put("mail.smtp.port", port);
> +               props.put("mail.smtp.socketFactory.port", port);
> +           }
> +           if (ssl != null && ssl.length() > 0) {
> +               props.put("mail.smtp.socketFactory.class", ssl);
> +               props.put("mail.smtp.socketFactory.fallback", "false");
> +           }
>              if (useSmtpAuth) {
>                  props.put("mail.smtp.auth", "true");
>              }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (OFBIZ-1256) Send mail through gmail with the javamail api in ofbiz

Posted by "Fabien Carrion (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OFBIZ-1256?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Fabien Carrion updated OFBIZ-1256:
----------------------------------

    Attachment: emailssl_diff.patch

done with trunk version,

> Send mail through gmail with the javamail api in ofbiz
> ------------------------------------------------------
>
>                 Key: OFBIZ-1256
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1256
>             Project: OFBiz
>          Issue Type: New Feature
>    Affects Versions: SVN trunk
>         Environment: All
>            Reporter: Fabien Carrion
>            Priority: Minor
>             Fix For: SVN trunk
>
>         Attachments: emailssl_diff.patch
>
>
> This a small patch to accept ssl connections to smtp servers.
> Index: content/src/org/ofbiz/content/email/EmailServices.java
> ===================================================================
> --- content/src/org/ofbiz/content/email/EmailServices.java      (revision 576503)
> +++ content/src/org/ofbiz/content/email/EmailServices.java      (working copy)
> @@ -129,6 +129,8 @@
>  
>          String sendFrom = (String) context.get("sendFrom");
>          String sendType = (String) context.get("sendType");
> +        String port = (String) context.get("port");
> +        String ssl = (String) context.get("ssl");
>          String sendVia = (String) context.get("sendVia");
>          String authUser = (String) context.get("authUser");
>          String authPass = (String) context.get("authPass");
> @@ -151,6 +153,12 @@
>              if (authUser != null && authUser.length() > 0) {
>                  useSmtpAuth = true;
>              }
> +            if (port == null || port.length() == 0) {
> +                port = UtilProperties.getPropertyValue("general.properties", "mail.smtp.port", "25");
> +            }
> +            if (ssl == null || ssl.length() == 0) {
> +                ssl = UtilProperties.getPropertyValue("general.properties", "mail.smtp.ssl", "javax.net.ssl.SSLSocketFactory");
> +            }
>          } else if (sendVia == null) {
>              return ServiceUtil.returnError("Parameter sendVia is required when sendType is not mail.smtp.host");
>          }
> @@ -168,6 +176,14 @@
>          try {
>              Properties props = System.getProperties();
>              props.put(sendType, sendVia);
> +           if (port != null && port.length() > 0) {
> +               props.put("mail.smtp.port", port);
> +               props.put("mail.smtp.socketFactory.port", port);
> +           }
> +           if (ssl != null && ssl.length() > 0) {
> +               props.put("mail.smtp.socketFactory.class", ssl);
> +               props.put("mail.smtp.socketFactory.fallback", "false");
> +           }
>              if (useSmtpAuth) {
>                  props.put("mail.smtp.auth", "true");
>              }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (OFBIZ-1256) Send mail through gmail with the javamail api in ofbiz

Posted by "BJ Freeman (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-1256?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12554032 ] 

BJ Freeman commented on OFBIZ-1256:
-----------------------------------

the next step was to put all of the configuration that is in the javamail containter in the database.
this would require more discussion about how to implement, using contactMech. contactmech would have to modified for electronic address types
and contact purpose of Default outgoing Mail address.
the javamail container uses a map(store) which in not available to context.get so some more code would have to be added to incorporate this
the current javamail container only deals with getting incoming mail   for a provider 
the Added code in the 
https://issues.apache.org/jira/browse/OFBIZ-65
provides for which provider to send to and would be depreciated one the issues about dealing with sending emails addresses from
properties.
which is part of the whole 
https://issues.apache.org/jira/browse/OFBIZ-1286

I have implemented the contactmech way of sending different emails types to a suppliers.
https://issues.apache.org/jira/browse/OFBIZ-143



> Send mail through gmail with the javamail api in ofbiz
> ------------------------------------------------------
>
>                 Key: OFBIZ-1256
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1256
>             Project: OFBiz
>          Issue Type: New Feature
>          Components: content
>    Affects Versions: SVN trunk
>         Environment: All
>            Reporter: Fabien Carrion
>            Assignee: Jacques Le Roux
>            Priority: Minor
>             Fix For: SVN trunk
>
>         Attachments: emailssl_diff.patch, gmail.patch
>
>
> This a small patch to accept ssl connections to smtp servers.
> Index: content/src/org/ofbiz/content/email/EmailServices.java
> ===================================================================
> --- content/src/org/ofbiz/content/email/EmailServices.java      (revision 576503)
> +++ content/src/org/ofbiz/content/email/EmailServices.java      (working copy)
> @@ -129,6 +129,8 @@
>  
>          String sendFrom = (String) context.get("sendFrom");
>          String sendType = (String) context.get("sendType");
> +        String port = (String) context.get("port");
> +        String ssl = (String) context.get("ssl");
>          String sendVia = (String) context.get("sendVia");
>          String authUser = (String) context.get("authUser");
>          String authPass = (String) context.get("authPass");
> @@ -151,6 +153,12 @@
>              if (authUser != null && authUser.length() > 0) {
>                  useSmtpAuth = true;
>              }
> +            if (port == null || port.length() == 0) {
> +                port = UtilProperties.getPropertyValue("general.properties", "mail.smtp.port", "25");
> +            }
> +            if (ssl == null || ssl.length() == 0) {
> +                ssl = UtilProperties.getPropertyValue("general.properties", "mail.smtp.ssl", "javax.net.ssl.SSLSocketFactory");
> +            }
>          } else if (sendVia == null) {
>              return ServiceUtil.returnError("Parameter sendVia is required when sendType is not mail.smtp.host");
>          }
> @@ -168,6 +176,14 @@
>          try {
>              Properties props = System.getProperties();
>              props.put(sendType, sendVia);
> +           if (port != null && port.length() > 0) {
> +               props.put("mail.smtp.port", port);
> +               props.put("mail.smtp.socketFactory.port", port);
> +           }
> +           if (ssl != null && ssl.length() > 0) {
> +               props.put("mail.smtp.socketFactory.class", ssl);
> +               props.put("mail.smtp.socketFactory.fallback", "false");
> +           }
>              if (useSmtpAuth) {
>                  props.put("mail.smtp.auth", "true");
>              }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (OFBIZ-1256) Send mail through gmail with the javamail api in ofbiz

Posted by "BJ Freeman (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-1256?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12554264 ] 

BJ Freeman commented on OFBIZ-1256:
-----------------------------------

I can see the properties being uncommented and set to null as long as code checks for a null and give a log error.

and add code 
if the mail.notifications.redirectTo= is null
mail.notifications.enabled
should be set to N.

> Send mail through gmail with the javamail api in ofbiz
> ------------------------------------------------------
>
>                 Key: OFBIZ-1256
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1256
>             Project: OFBiz
>          Issue Type: New Feature
>          Components: content
>    Affects Versions: SVN trunk
>         Environment: All
>            Reporter: Fabien Carrion
>            Assignee: Jacques Le Roux
>            Priority: Minor
>             Fix For: SVN trunk
>
>         Attachments: emailssl_diff.patch, gmail.patch
>
>
> This a small patch to accept ssl connections to smtp servers.
> Index: content/src/org/ofbiz/content/email/EmailServices.java
> ===================================================================
> --- content/src/org/ofbiz/content/email/EmailServices.java      (revision 576503)
> +++ content/src/org/ofbiz/content/email/EmailServices.java      (working copy)
> @@ -129,6 +129,8 @@
>  
>          String sendFrom = (String) context.get("sendFrom");
>          String sendType = (String) context.get("sendType");
> +        String port = (String) context.get("port");
> +        String ssl = (String) context.get("ssl");
>          String sendVia = (String) context.get("sendVia");
>          String authUser = (String) context.get("authUser");
>          String authPass = (String) context.get("authPass");
> @@ -151,6 +153,12 @@
>              if (authUser != null && authUser.length() > 0) {
>                  useSmtpAuth = true;
>              }
> +            if (port == null || port.length() == 0) {
> +                port = UtilProperties.getPropertyValue("general.properties", "mail.smtp.port", "25");
> +            }
> +            if (ssl == null || ssl.length() == 0) {
> +                ssl = UtilProperties.getPropertyValue("general.properties", "mail.smtp.ssl", "javax.net.ssl.SSLSocketFactory");
> +            }
>          } else if (sendVia == null) {
>              return ServiceUtil.returnError("Parameter sendVia is required when sendType is not mail.smtp.host");
>          }
> @@ -168,6 +176,14 @@
>          try {
>              Properties props = System.getProperties();
>              props.put(sendType, sendVia);
> +           if (port != null && port.length() > 0) {
> +               props.put("mail.smtp.port", port);
> +               props.put("mail.smtp.socketFactory.port", port);
> +           }
> +           if (ssl != null && ssl.length() > 0) {
> +               props.put("mail.smtp.socketFactory.class", ssl);
> +               props.put("mail.smtp.socketFactory.fallback", "false");
> +           }
>              if (useSmtpAuth) {
>                  props.put("mail.smtp.auth", "true");
>              }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (OFBIZ-1256) Send mail through gmail with the javamail api in ofbiz

Posted by "BJ Freeman (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-1256?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12554057 ] 

BJ Freeman commented on OFBIZ-1256:
-----------------------------------

at this point I suggest that my jira not be linked to this one
my comments removed
and let this one go foward with chrises guidance


> Send mail through gmail with the javamail api in ofbiz
> ------------------------------------------------------
>
>                 Key: OFBIZ-1256
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1256
>             Project: OFBiz
>          Issue Type: New Feature
>          Components: content
>    Affects Versions: SVN trunk
>         Environment: All
>            Reporter: Fabien Carrion
>            Assignee: Jacques Le Roux
>            Priority: Minor
>             Fix For: SVN trunk
>
>         Attachments: emailssl_diff.patch, gmail.patch
>
>
> This a small patch to accept ssl connections to smtp servers.
> Index: content/src/org/ofbiz/content/email/EmailServices.java
> ===================================================================
> --- content/src/org/ofbiz/content/email/EmailServices.java      (revision 576503)
> +++ content/src/org/ofbiz/content/email/EmailServices.java      (working copy)
> @@ -129,6 +129,8 @@
>  
>          String sendFrom = (String) context.get("sendFrom");
>          String sendType = (String) context.get("sendType");
> +        String port = (String) context.get("port");
> +        String ssl = (String) context.get("ssl");
>          String sendVia = (String) context.get("sendVia");
>          String authUser = (String) context.get("authUser");
>          String authPass = (String) context.get("authPass");
> @@ -151,6 +153,12 @@
>              if (authUser != null && authUser.length() > 0) {
>                  useSmtpAuth = true;
>              }
> +            if (port == null || port.length() == 0) {
> +                port = UtilProperties.getPropertyValue("general.properties", "mail.smtp.port", "25");
> +            }
> +            if (ssl == null || ssl.length() == 0) {
> +                ssl = UtilProperties.getPropertyValue("general.properties", "mail.smtp.ssl", "javax.net.ssl.SSLSocketFactory");
> +            }
>          } else if (sendVia == null) {
>              return ServiceUtil.returnError("Parameter sendVia is required when sendType is not mail.smtp.host");
>          }
> @@ -168,6 +176,14 @@
>          try {
>              Properties props = System.getProperties();
>              props.put(sendType, sendVia);
> +           if (port != null && port.length() > 0) {
> +               props.put("mail.smtp.port", port);
> +               props.put("mail.smtp.socketFactory.port", port);
> +           }
> +           if (ssl != null && ssl.length() > 0) {
> +               props.put("mail.smtp.socketFactory.class", ssl);
> +               props.put("mail.smtp.socketFactory.fallback", "false");
> +           }
>              if (useSmtpAuth) {
>                  props.put("mail.smtp.auth", "true");
>              }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (OFBIZ-1256) Send mail through gmail with the javamail api in ofbiz

Posted by "Fabien Carrion (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OFBIZ-1256?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Fabien Carrion updated OFBIZ-1256:
----------------------------------

    Attachment: emailssl_diff.patch.gz

Making a file patch and changing to coding style

> Send mail through gmail with the javamail api in ofbiz
> ------------------------------------------------------
>
>                 Key: OFBIZ-1256
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1256
>             Project: OFBiz
>          Issue Type: New Feature
>    Affects Versions: SVN trunk
>         Environment: All
>            Reporter: Fabien Carrion
>            Priority: Minor
>             Fix For: SVN trunk
>
>         Attachments: emailssl_diff.patch.gz
>
>
> This a small patch to accept ssl connections to smtp servers.
> Index: content/src/org/ofbiz/content/email/EmailServices.java
> ===================================================================
> --- content/src/org/ofbiz/content/email/EmailServices.java      (revision 576503)
> +++ content/src/org/ofbiz/content/email/EmailServices.java      (working copy)
> @@ -129,6 +129,8 @@
>  
>          String sendFrom = (String) context.get("sendFrom");
>          String sendType = (String) context.get("sendType");
> +        String port = (String) context.get("port");
> +        String ssl = (String) context.get("ssl");
>          String sendVia = (String) context.get("sendVia");
>          String authUser = (String) context.get("authUser");
>          String authPass = (String) context.get("authPass");
> @@ -151,6 +153,12 @@
>              if (authUser != null && authUser.length() > 0) {
>                  useSmtpAuth = true;
>              }
> +            if (port == null || port.length() == 0) {
> +                port = UtilProperties.getPropertyValue("general.properties", "mail.smtp.port", "25");
> +            }
> +            if (ssl == null || ssl.length() == 0) {
> +                ssl = UtilProperties.getPropertyValue("general.properties", "mail.smtp.ssl", "javax.net.ssl.SSLSocketFactory");
> +            }
>          } else if (sendVia == null) {
>              return ServiceUtil.returnError("Parameter sendVia is required when sendType is not mail.smtp.host");
>          }
> @@ -168,6 +176,14 @@
>          try {
>              Properties props = System.getProperties();
>              props.put(sendType, sendVia);
> +           if (port != null && port.length() > 0) {
> +               props.put("mail.smtp.port", port);
> +               props.put("mail.smtp.socketFactory.port", port);
> +           }
> +           if (ssl != null && ssl.length() > 0) {
> +               props.put("mail.smtp.socketFactory.class", ssl);
> +               props.put("mail.smtp.socketFactory.fallback", "false");
> +           }
>              if (useSmtpAuth) {
>                  props.put("mail.smtp.auth", "true");
>              }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (OFBIZ-1256) Send mail through gmail with the javamail api in ofbiz

Posted by "Jacques Le Roux (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-1256?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12554098 ] 

Jacques Le Roux commented on OFBIZ-1256:
----------------------------------------

I'd prefer to keep BJ comments but now the 2 issues are not related anymore.

> Send mail through gmail with the javamail api in ofbiz
> ------------------------------------------------------
>
>                 Key: OFBIZ-1256
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1256
>             Project: OFBiz
>          Issue Type: New Feature
>          Components: content
>    Affects Versions: SVN trunk
>         Environment: All
>            Reporter: Fabien Carrion
>            Assignee: Jacques Le Roux
>            Priority: Minor
>             Fix For: SVN trunk
>
>         Attachments: emailssl_diff.patch, gmail.patch
>
>
> This a small patch to accept ssl connections to smtp servers.
> Index: content/src/org/ofbiz/content/email/EmailServices.java
> ===================================================================
> --- content/src/org/ofbiz/content/email/EmailServices.java      (revision 576503)
> +++ content/src/org/ofbiz/content/email/EmailServices.java      (working copy)
> @@ -129,6 +129,8 @@
>  
>          String sendFrom = (String) context.get("sendFrom");
>          String sendType = (String) context.get("sendType");
> +        String port = (String) context.get("port");
> +        String ssl = (String) context.get("ssl");
>          String sendVia = (String) context.get("sendVia");
>          String authUser = (String) context.get("authUser");
>          String authPass = (String) context.get("authPass");
> @@ -151,6 +153,12 @@
>              if (authUser != null && authUser.length() > 0) {
>                  useSmtpAuth = true;
>              }
> +            if (port == null || port.length() == 0) {
> +                port = UtilProperties.getPropertyValue("general.properties", "mail.smtp.port", "25");
> +            }
> +            if (ssl == null || ssl.length() == 0) {
> +                ssl = UtilProperties.getPropertyValue("general.properties", "mail.smtp.ssl", "javax.net.ssl.SSLSocketFactory");
> +            }
>          } else if (sendVia == null) {
>              return ServiceUtil.returnError("Parameter sendVia is required when sendType is not mail.smtp.host");
>          }
> @@ -168,6 +176,14 @@
>          try {
>              Properties props = System.getProperties();
>              props.put(sendType, sendVia);
> +           if (port != null && port.length() > 0) {
> +               props.put("mail.smtp.port", port);
> +               props.put("mail.smtp.socketFactory.port", port);
> +           }
> +           if (ssl != null && ssl.length() > 0) {
> +               props.put("mail.smtp.socketFactory.class", ssl);
> +               props.put("mail.smtp.socketFactory.fallback", "false");
> +           }
>              if (useSmtpAuth) {
>                  props.put("mail.smtp.auth", "true");
>              }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (OFBIZ-1256) Send mail through gmail with the javamail api in ofbiz

Posted by "Chris Howe (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-1256?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12554024 ] 

Chris Howe commented on OFBIZ-1256:
-----------------------------------

Looking at BJ's suggestions for the multiple email accounts, it shouldn't affect this issue.

A mutliple account solution would make the appropriate data available in the context.get(""); for what ever account is sending the email.  As a side note to BJ's suggestion, the account information should be stored in the database, not in property files.  The general.properties are simply default configurations to pass to JavaMail if nothing is provided in the context.

> Send mail through gmail with the javamail api in ofbiz
> ------------------------------------------------------
>
>                 Key: OFBIZ-1256
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1256
>             Project: OFBiz
>          Issue Type: New Feature
>          Components: content
>    Affects Versions: SVN trunk
>         Environment: All
>            Reporter: Fabien Carrion
>            Assignee: Jacques Le Roux
>            Priority: Minor
>             Fix For: SVN trunk
>
>         Attachments: emailssl_diff.patch, gmail.patch
>
>
> This a small patch to accept ssl connections to smtp servers.
> Index: content/src/org/ofbiz/content/email/EmailServices.java
> ===================================================================
> --- content/src/org/ofbiz/content/email/EmailServices.java      (revision 576503)
> +++ content/src/org/ofbiz/content/email/EmailServices.java      (working copy)
> @@ -129,6 +129,8 @@
>  
>          String sendFrom = (String) context.get("sendFrom");
>          String sendType = (String) context.get("sendType");
> +        String port = (String) context.get("port");
> +        String ssl = (String) context.get("ssl");
>          String sendVia = (String) context.get("sendVia");
>          String authUser = (String) context.get("authUser");
>          String authPass = (String) context.get("authPass");
> @@ -151,6 +153,12 @@
>              if (authUser != null && authUser.length() > 0) {
>                  useSmtpAuth = true;
>              }
> +            if (port == null || port.length() == 0) {
> +                port = UtilProperties.getPropertyValue("general.properties", "mail.smtp.port", "25");
> +            }
> +            if (ssl == null || ssl.length() == 0) {
> +                ssl = UtilProperties.getPropertyValue("general.properties", "mail.smtp.ssl", "javax.net.ssl.SSLSocketFactory");
> +            }
>          } else if (sendVia == null) {
>              return ServiceUtil.returnError("Parameter sendVia is required when sendType is not mail.smtp.host");
>          }
> @@ -168,6 +176,14 @@
>          try {
>              Properties props = System.getProperties();
>              props.put(sendType, sendVia);
> +           if (port != null && port.length() > 0) {
> +               props.put("mail.smtp.port", port);
> +               props.put("mail.smtp.socketFactory.port", port);
> +           }
> +           if (ssl != null && ssl.length() > 0) {
> +               props.put("mail.smtp.socketFactory.class", ssl);
> +               props.put("mail.smtp.socketFactory.fallback", "false");
> +           }
>              if (useSmtpAuth) {
>                  props.put("mail.smtp.auth", "true");
>              }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (OFBIZ-1256) Send mail through gmail with the javamail api in ofbiz

Posted by "Chris Howe (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-1256?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12554048 ] 

Chris Howe commented on OFBIZ-1256:
-----------------------------------

What additional variables are needed?

> Send mail through gmail with the javamail api in ofbiz
> ------------------------------------------------------
>
>                 Key: OFBIZ-1256
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1256
>             Project: OFBiz
>          Issue Type: New Feature
>          Components: content
>    Affects Versions: SVN trunk
>         Environment: All
>            Reporter: Fabien Carrion
>            Assignee: Jacques Le Roux
>            Priority: Minor
>             Fix For: SVN trunk
>
>         Attachments: emailssl_diff.patch, gmail.patch
>
>
> This a small patch to accept ssl connections to smtp servers.
> Index: content/src/org/ofbiz/content/email/EmailServices.java
> ===================================================================
> --- content/src/org/ofbiz/content/email/EmailServices.java      (revision 576503)
> +++ content/src/org/ofbiz/content/email/EmailServices.java      (working copy)
> @@ -129,6 +129,8 @@
>  
>          String sendFrom = (String) context.get("sendFrom");
>          String sendType = (String) context.get("sendType");
> +        String port = (String) context.get("port");
> +        String ssl = (String) context.get("ssl");
>          String sendVia = (String) context.get("sendVia");
>          String authUser = (String) context.get("authUser");
>          String authPass = (String) context.get("authPass");
> @@ -151,6 +153,12 @@
>              if (authUser != null && authUser.length() > 0) {
>                  useSmtpAuth = true;
>              }
> +            if (port == null || port.length() == 0) {
> +                port = UtilProperties.getPropertyValue("general.properties", "mail.smtp.port", "25");
> +            }
> +            if (ssl == null || ssl.length() == 0) {
> +                ssl = UtilProperties.getPropertyValue("general.properties", "mail.smtp.ssl", "javax.net.ssl.SSLSocketFactory");
> +            }
>          } else if (sendVia == null) {
>              return ServiceUtil.returnError("Parameter sendVia is required when sendType is not mail.smtp.host");
>          }
> @@ -168,6 +176,14 @@
>          try {
>              Properties props = System.getProperties();
>              props.put(sendType, sendVia);
> +           if (port != null && port.length() > 0) {
> +               props.put("mail.smtp.port", port);
> +               props.put("mail.smtp.socketFactory.port", port);
> +           }
> +           if (ssl != null && ssl.length() > 0) {
> +               props.put("mail.smtp.socketFactory.class", ssl);
> +               props.put("mail.smtp.socketFactory.fallback", "false");
> +           }
>              if (useSmtpAuth) {
>                  props.put("mail.smtp.auth", "true");
>              }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (OFBIZ-1256) Send mail through gmail with the javamail api in ofbiz

Posted by "Jacques Le Roux (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-1256?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12549770 ] 

Jacques Le Roux commented on OFBIZ-1256:
----------------------------------------

I would like to commit this patch if nobody see troubles in it

> Send mail through gmail with the javamail api in ofbiz
> ------------------------------------------------------
>
>                 Key: OFBIZ-1256
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1256
>             Project: OFBiz
>          Issue Type: New Feature
>    Affects Versions: SVN trunk
>         Environment: All
>            Reporter: Fabien Carrion
>            Assignee: Jacques Le Roux
>            Priority: Minor
>             Fix For: SVN trunk
>
>         Attachments: emailssl_diff.patch
>
>
> This a small patch to accept ssl connections to smtp servers.
> Index: content/src/org/ofbiz/content/email/EmailServices.java
> ===================================================================
> --- content/src/org/ofbiz/content/email/EmailServices.java      (revision 576503)
> +++ content/src/org/ofbiz/content/email/EmailServices.java      (working copy)
> @@ -129,6 +129,8 @@
>  
>          String sendFrom = (String) context.get("sendFrom");
>          String sendType = (String) context.get("sendType");
> +        String port = (String) context.get("port");
> +        String ssl = (String) context.get("ssl");
>          String sendVia = (String) context.get("sendVia");
>          String authUser = (String) context.get("authUser");
>          String authPass = (String) context.get("authPass");
> @@ -151,6 +153,12 @@
>              if (authUser != null && authUser.length() > 0) {
>                  useSmtpAuth = true;
>              }
> +            if (port == null || port.length() == 0) {
> +                port = UtilProperties.getPropertyValue("general.properties", "mail.smtp.port", "25");
> +            }
> +            if (ssl == null || ssl.length() == 0) {
> +                ssl = UtilProperties.getPropertyValue("general.properties", "mail.smtp.ssl", "javax.net.ssl.SSLSocketFactory");
> +            }
>          } else if (sendVia == null) {
>              return ServiceUtil.returnError("Parameter sendVia is required when sendType is not mail.smtp.host");
>          }
> @@ -168,6 +176,14 @@
>          try {
>              Properties props = System.getProperties();
>              props.put(sendType, sendVia);
> +           if (port != null && port.length() > 0) {
> +               props.put("mail.smtp.port", port);
> +               props.put("mail.smtp.socketFactory.port", port);
> +           }
> +           if (ssl != null && ssl.length() > 0) {
> +               props.put("mail.smtp.socketFactory.class", ssl);
> +               props.put("mail.smtp.socketFactory.fallback", "false");
> +           }
>              if (useSmtpAuth) {
>                  props.put("mail.smtp.auth", "true");
>              }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Issue Comment Edited: (OFBIZ-1256) Send mail through gmail with the javamail api in ofbiz

Posted by "Chris Howe (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-1256?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12554052 ] 

cjhowe edited comment on OFBIZ-1256 at 12/21/07 2:44 PM:
-------------------------------------------------------------

These apear to be all of the variables available for the map(store).  The first group is dealt with between the current implementation and Fabiens patch, the second group appears ignored.  Is there a need to address any of them?

mail.smtp.user
mail.smtp.host
mail.smtp.port
mail.smtp.from
mail.smtp.auth
mail.smtp.socketFactory.class
mail.smtp.socketFactory.fallback
mail.smtp.socketFactory.port
mail.smtp.starttls.enable

mail.smtp.connectiontimeout (default infinite)
mail.smtp.timeout (default infinite)
mail.smtp.localhost (default InetAddress.getLocalHost().getHostName())
mail.smtp.localaddress (default picked by Socket class)
mail.smtp.localport (default picked by Socket class)
mail.smtp.ehlo (default true)
mail.smtp.submitter 
mail.smtp.dsn.notify
mail.smtp.dsn.ret
mail.smtp.allow8bitmime
mail.smtp.sendpartial (default false)
mail.smtp.sasl.realm
mail.smtp.quitwait (default true)
mail.smtp.reportsuccess
mail.smtp.mailextension
mail.smtp.userset (default false)
mail.smtp.ssl.protocols
mail.smtp.ssl.ciphersuites

      was (Author: cjhowe):
    These apear to be all of the variables available for the map(store).  The first group is dealt with between the current implementation and Fabiens patch, the second group appears ignored.  Is there a need to address any of them?

mail.smtp.user
mail.smtp.host
mail.smtp.port
mail.smtp.from
mail.smtp.auth
mail.smtp.socketFactory.class
mail.smtp.socketFactory.fallback
mail.smtp.socketFactory.port
mail.smtp.starttls.enable

mail.smtp.connectiontimeout
mail.smtp.timeout
mail.smtp.localhost
mail.smtp.localaddress
mail.smtp.localport
mail.smtp.ehlo
mail.smtp.submitter
mail.smtp.dsn.notify
mail.smtp.dsn.ret
mail.smtp.allow8bitmime
mail.smtp.sendpartial
mail.smtp.sasl.realm
mail.smtp.quitwait
mail.smtp.reportsuccess
mail.smtp.mailextension
mail.smtp.userset
mail.smtp.ssl.protocols
mail.smtp.ssl.ciphersuites
  
> Send mail through gmail with the javamail api in ofbiz
> ------------------------------------------------------
>
>                 Key: OFBIZ-1256
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1256
>             Project: OFBiz
>          Issue Type: New Feature
>          Components: content
>    Affects Versions: SVN trunk
>         Environment: All
>            Reporter: Fabien Carrion
>            Assignee: Jacques Le Roux
>            Priority: Minor
>             Fix For: SVN trunk
>
>         Attachments: emailssl_diff.patch, gmail.patch
>
>
> This a small patch to accept ssl connections to smtp servers.
> Index: content/src/org/ofbiz/content/email/EmailServices.java
> ===================================================================
> --- content/src/org/ofbiz/content/email/EmailServices.java      (revision 576503)
> +++ content/src/org/ofbiz/content/email/EmailServices.java      (working copy)
> @@ -129,6 +129,8 @@
>  
>          String sendFrom = (String) context.get("sendFrom");
>          String sendType = (String) context.get("sendType");
> +        String port = (String) context.get("port");
> +        String ssl = (String) context.get("ssl");
>          String sendVia = (String) context.get("sendVia");
>          String authUser = (String) context.get("authUser");
>          String authPass = (String) context.get("authPass");
> @@ -151,6 +153,12 @@
>              if (authUser != null && authUser.length() > 0) {
>                  useSmtpAuth = true;
>              }
> +            if (port == null || port.length() == 0) {
> +                port = UtilProperties.getPropertyValue("general.properties", "mail.smtp.port", "25");
> +            }
> +            if (ssl == null || ssl.length() == 0) {
> +                ssl = UtilProperties.getPropertyValue("general.properties", "mail.smtp.ssl", "javax.net.ssl.SSLSocketFactory");
> +            }
>          } else if (sendVia == null) {
>              return ServiceUtil.returnError("Parameter sendVia is required when sendType is not mail.smtp.host");
>          }
> @@ -168,6 +176,14 @@
>          try {
>              Properties props = System.getProperties();
>              props.put(sendType, sendVia);
> +           if (port != null && port.length() > 0) {
> +               props.put("mail.smtp.port", port);
> +               props.put("mail.smtp.socketFactory.port", port);
> +           }
> +           if (ssl != null && ssl.length() > 0) {
> +               props.put("mail.smtp.socketFactory.class", ssl);
> +               props.put("mail.smtp.socketFactory.fallback", "false");
> +           }
>              if (useSmtpAuth) {
>                  props.put("mail.smtp.auth", "true");
>              }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (OFBIZ-1256) Send mail through gmail with the javamail api in ofbiz

Posted by "Chris Howe (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OFBIZ-1256?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Chris Howe updated OFBIZ-1256:
------------------------------

    Attachment: gmail.patch

> Send mail through gmail with the javamail api in ofbiz
> ------------------------------------------------------
>
>                 Key: OFBIZ-1256
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1256
>             Project: OFBiz
>          Issue Type: New Feature
>          Components: content
>    Affects Versions: SVN trunk
>         Environment: All
>            Reporter: Fabien Carrion
>            Assignee: Jacques Le Roux
>            Priority: Minor
>             Fix For: SVN trunk
>
>         Attachments: emailssl_diff.patch, gmail.patch
>
>
> This a small patch to accept ssl connections to smtp servers.
> Index: content/src/org/ofbiz/content/email/EmailServices.java
> ===================================================================
> --- content/src/org/ofbiz/content/email/EmailServices.java      (revision 576503)
> +++ content/src/org/ofbiz/content/email/EmailServices.java      (working copy)
> @@ -129,6 +129,8 @@
>  
>          String sendFrom = (String) context.get("sendFrom");
>          String sendType = (String) context.get("sendType");
> +        String port = (String) context.get("port");
> +        String ssl = (String) context.get("ssl");
>          String sendVia = (String) context.get("sendVia");
>          String authUser = (String) context.get("authUser");
>          String authPass = (String) context.get("authPass");
> @@ -151,6 +153,12 @@
>              if (authUser != null && authUser.length() > 0) {
>                  useSmtpAuth = true;
>              }
> +            if (port == null || port.length() == 0) {
> +                port = UtilProperties.getPropertyValue("general.properties", "mail.smtp.port", "25");
> +            }
> +            if (ssl == null || ssl.length() == 0) {
> +                ssl = UtilProperties.getPropertyValue("general.properties", "mail.smtp.ssl", "javax.net.ssl.SSLSocketFactory");
> +            }
>          } else if (sendVia == null) {
>              return ServiceUtil.returnError("Parameter sendVia is required when sendType is not mail.smtp.host");
>          }
> @@ -168,6 +176,14 @@
>          try {
>              Properties props = System.getProperties();
>              props.put(sendType, sendVia);
> +           if (port != null && port.length() > 0) {
> +               props.put("mail.smtp.port", port);
> +               props.put("mail.smtp.socketFactory.port", port);
> +           }
> +           if (ssl != null && ssl.length() > 0) {
> +               props.put("mail.smtp.socketFactory.class", ssl);
> +               props.put("mail.smtp.socketFactory.fallback", "false");
> +           }
>              if (useSmtpAuth) {
>                  props.put("mail.smtp.auth", "true");
>              }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (OFBIZ-1256) Send mail through gmail with the javamail api in ofbiz

Posted by "Chris Howe (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OFBIZ-1256?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Chris Howe updated OFBIZ-1256:
------------------------------

    Attachment:     (was: gmail.patch)

> Send mail through gmail with the javamail api in ofbiz
> ------------------------------------------------------
>
>                 Key: OFBIZ-1256
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1256
>             Project: OFBiz
>          Issue Type: New Feature
>          Components: content
>    Affects Versions: SVN trunk
>         Environment: All
>            Reporter: Fabien Carrion
>            Assignee: Jacques Le Roux
>            Priority: Minor
>             Fix For: SVN trunk
>
>         Attachments: emailssl_diff.patch, gmail.patch
>
>
> This a small patch to accept ssl connections to smtp servers.
> Index: content/src/org/ofbiz/content/email/EmailServices.java
> ===================================================================
> --- content/src/org/ofbiz/content/email/EmailServices.java      (revision 576503)
> +++ content/src/org/ofbiz/content/email/EmailServices.java      (working copy)
> @@ -129,6 +129,8 @@
>  
>          String sendFrom = (String) context.get("sendFrom");
>          String sendType = (String) context.get("sendType");
> +        String port = (String) context.get("port");
> +        String ssl = (String) context.get("ssl");
>          String sendVia = (String) context.get("sendVia");
>          String authUser = (String) context.get("authUser");
>          String authPass = (String) context.get("authPass");
> @@ -151,6 +153,12 @@
>              if (authUser != null && authUser.length() > 0) {
>                  useSmtpAuth = true;
>              }
> +            if (port == null || port.length() == 0) {
> +                port = UtilProperties.getPropertyValue("general.properties", "mail.smtp.port", "25");
> +            }
> +            if (ssl == null || ssl.length() == 0) {
> +                ssl = UtilProperties.getPropertyValue("general.properties", "mail.smtp.ssl", "javax.net.ssl.SSLSocketFactory");
> +            }
>          } else if (sendVia == null) {
>              return ServiceUtil.returnError("Parameter sendVia is required when sendType is not mail.smtp.host");
>          }
> @@ -168,6 +176,14 @@
>          try {
>              Properties props = System.getProperties();
>              props.put(sendType, sendVia);
> +           if (port != null && port.length() > 0) {
> +               props.put("mail.smtp.port", port);
> +               props.put("mail.smtp.socketFactory.port", port);
> +           }
> +           if (ssl != null && ssl.length() > 0) {
> +               props.put("mail.smtp.socketFactory.class", ssl);
> +               props.put("mail.smtp.socketFactory.fallback", "false");
> +           }
>              if (useSmtpAuth) {
>                  props.put("mail.smtp.auth", "true");
>              }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (OFBIZ-1256) Send mail through gmail with the javamail api in ofbiz

Posted by "Chris Howe (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-1256?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12554040 ] 

Chris Howe commented on OFBIZ-1256:
-----------------------------------

It appears that Fabien's patch and my previous comment would add the remaining map(store) variables, does it not?

> Send mail through gmail with the javamail api in ofbiz
> ------------------------------------------------------
>
>                 Key: OFBIZ-1256
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1256
>             Project: OFBiz
>          Issue Type: New Feature
>          Components: content
>    Affects Versions: SVN trunk
>         Environment: All
>            Reporter: Fabien Carrion
>            Assignee: Jacques Le Roux
>            Priority: Minor
>             Fix For: SVN trunk
>
>         Attachments: emailssl_diff.patch, gmail.patch
>
>
> This a small patch to accept ssl connections to smtp servers.
> Index: content/src/org/ofbiz/content/email/EmailServices.java
> ===================================================================
> --- content/src/org/ofbiz/content/email/EmailServices.java      (revision 576503)
> +++ content/src/org/ofbiz/content/email/EmailServices.java      (working copy)
> @@ -129,6 +129,8 @@
>  
>          String sendFrom = (String) context.get("sendFrom");
>          String sendType = (String) context.get("sendType");
> +        String port = (String) context.get("port");
> +        String ssl = (String) context.get("ssl");
>          String sendVia = (String) context.get("sendVia");
>          String authUser = (String) context.get("authUser");
>          String authPass = (String) context.get("authPass");
> @@ -151,6 +153,12 @@
>              if (authUser != null && authUser.length() > 0) {
>                  useSmtpAuth = true;
>              }
> +            if (port == null || port.length() == 0) {
> +                port = UtilProperties.getPropertyValue("general.properties", "mail.smtp.port", "25");
> +            }
> +            if (ssl == null || ssl.length() == 0) {
> +                ssl = UtilProperties.getPropertyValue("general.properties", "mail.smtp.ssl", "javax.net.ssl.SSLSocketFactory");
> +            }
>          } else if (sendVia == null) {
>              return ServiceUtil.returnError("Parameter sendVia is required when sendType is not mail.smtp.host");
>          }
> @@ -168,6 +176,14 @@
>          try {
>              Properties props = System.getProperties();
>              props.put(sendType, sendVia);
> +           if (port != null && port.length() > 0) {
> +               props.put("mail.smtp.port", port);
> +               props.put("mail.smtp.socketFactory.port", port);
> +           }
> +           if (ssl != null && ssl.length() > 0) {
> +               props.put("mail.smtp.socketFactory.class", ssl);
> +               props.put("mail.smtp.socketFactory.fallback", "false");
> +           }
>              if (useSmtpAuth) {
>                  props.put("mail.smtp.auth", "true");
>              }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (OFBIZ-1256) Send mail through gmail with the javamail api in ofbiz

Posted by "Jacques Le Roux (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OFBIZ-1256?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jacques Le Roux closed OFBIZ-1256.
----------------------------------

    Resolution: Fixed

Thanks Fabien and Chris,

I commited a refactored patch from Fabien and Chris's patch in trunk revision 606789 . Some other code reformating changes in this commit also.


> Send mail through gmail with the javamail api in ofbiz
> ------------------------------------------------------
>
>                 Key: OFBIZ-1256
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1256
>             Project: OFBiz
>          Issue Type: New Feature
>          Components: content
>    Affects Versions: SVN trunk
>         Environment: All
>            Reporter: Fabien Carrion
>            Assignee: Jacques Le Roux
>            Priority: Minor
>             Fix For: SVN trunk
>
>         Attachments: emailssl_diff.patch, gmail.patch
>
>
> This a small patch to accept ssl connections to smtp servers.
> Index: content/src/org/ofbiz/content/email/EmailServices.java
> ===================================================================
> --- content/src/org/ofbiz/content/email/EmailServices.java      (revision 576503)
> +++ content/src/org/ofbiz/content/email/EmailServices.java      (working copy)
> @@ -129,6 +129,8 @@
>  
>          String sendFrom = (String) context.get("sendFrom");
>          String sendType = (String) context.get("sendType");
> +        String port = (String) context.get("port");
> +        String ssl = (String) context.get("ssl");
>          String sendVia = (String) context.get("sendVia");
>          String authUser = (String) context.get("authUser");
>          String authPass = (String) context.get("authPass");
> @@ -151,6 +153,12 @@
>              if (authUser != null && authUser.length() > 0) {
>                  useSmtpAuth = true;
>              }
> +            if (port == null || port.length() == 0) {
> +                port = UtilProperties.getPropertyValue("general.properties", "mail.smtp.port", "25");
> +            }
> +            if (ssl == null || ssl.length() == 0) {
> +                ssl = UtilProperties.getPropertyValue("general.properties", "mail.smtp.ssl", "javax.net.ssl.SSLSocketFactory");
> +            }
>          } else if (sendVia == null) {
>              return ServiceUtil.returnError("Parameter sendVia is required when sendType is not mail.smtp.host");
>          }
> @@ -168,6 +176,14 @@
>          try {
>              Properties props = System.getProperties();
>              props.put(sendType, sendVia);
> +           if (port != null && port.length() > 0) {
> +               props.put("mail.smtp.port", port);
> +               props.put("mail.smtp.socketFactory.port", port);
> +           }
> +           if (ssl != null && ssl.length() > 0) {
> +               props.put("mail.smtp.socketFactory.class", ssl);
> +               props.put("mail.smtp.socketFactory.fallback", "false");
> +           }
>              if (useSmtpAuth) {
>                  props.put("mail.smtp.auth", "true");
>              }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (OFBIZ-1256) Send mail through gmail with the javamail api in ofbiz

Posted by "Chris Howe (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-1256?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12554052 ] 

Chris Howe commented on OFBIZ-1256:
-----------------------------------

These apear to be all of the variables available for the map(store).  The first group is dealt with between the current implementation and Fabiens patch, the second group appears ignored.  Is there a need to address any of them?

mail.smtp.user
mail.smtp.host
mail.smtp.port
mail.smtp.from
mail.smtp.auth
mail.smtp.socketFactory.class
mail.smtp.socketFactory.fallback
mail.smtp.socketFactory.port
mail.smtp.starttls.enable

mail.smtp.connectiontimeout
mail.smtp.timeout
mail.smtp.localhost
mail.smtp.localaddress
mail.smtp.localport
mail.smtp.ehlo
mail.smtp.submitter
mail.smtp.dsn.notify
mail.smtp.dsn.ret
mail.smtp.allow8bitmime
mail.smtp.sendpartial
mail.smtp.sasl.realm
mail.smtp.quitwait
mail.smtp.reportsuccess
mail.smtp.mailextension
mail.smtp.userset
mail.smtp.ssl.protocols
mail.smtp.ssl.ciphersuites

> Send mail through gmail with the javamail api in ofbiz
> ------------------------------------------------------
>
>                 Key: OFBIZ-1256
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1256
>             Project: OFBiz
>          Issue Type: New Feature
>          Components: content
>    Affects Versions: SVN trunk
>         Environment: All
>            Reporter: Fabien Carrion
>            Assignee: Jacques Le Roux
>            Priority: Minor
>             Fix For: SVN trunk
>
>         Attachments: emailssl_diff.patch, gmail.patch
>
>
> This a small patch to accept ssl connections to smtp servers.
> Index: content/src/org/ofbiz/content/email/EmailServices.java
> ===================================================================
> --- content/src/org/ofbiz/content/email/EmailServices.java      (revision 576503)
> +++ content/src/org/ofbiz/content/email/EmailServices.java      (working copy)
> @@ -129,6 +129,8 @@
>  
>          String sendFrom = (String) context.get("sendFrom");
>          String sendType = (String) context.get("sendType");
> +        String port = (String) context.get("port");
> +        String ssl = (String) context.get("ssl");
>          String sendVia = (String) context.get("sendVia");
>          String authUser = (String) context.get("authUser");
>          String authPass = (String) context.get("authPass");
> @@ -151,6 +153,12 @@
>              if (authUser != null && authUser.length() > 0) {
>                  useSmtpAuth = true;
>              }
> +            if (port == null || port.length() == 0) {
> +                port = UtilProperties.getPropertyValue("general.properties", "mail.smtp.port", "25");
> +            }
> +            if (ssl == null || ssl.length() == 0) {
> +                ssl = UtilProperties.getPropertyValue("general.properties", "mail.smtp.ssl", "javax.net.ssl.SSLSocketFactory");
> +            }
>          } else if (sendVia == null) {
>              return ServiceUtil.returnError("Parameter sendVia is required when sendType is not mail.smtp.host");
>          }
> @@ -168,6 +176,14 @@
>          try {
>              Properties props = System.getProperties();
>              props.put(sendType, sendVia);
> +           if (port != null && port.length() > 0) {
> +               props.put("mail.smtp.port", port);
> +               props.put("mail.smtp.socketFactory.port", port);
> +           }
> +           if (ssl != null && ssl.length() > 0) {
> +               props.put("mail.smtp.socketFactory.class", ssl);
> +               props.put("mail.smtp.socketFactory.fallback", "false");
> +           }
>              if (useSmtpAuth) {
>                  props.put("mail.smtp.auth", "true");
>              }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.