Changeset 1459


Ignore:
Timestamp:
Feb 1, 2011, 1:10:23 PM (6 years ago)
Author:
work@…
Message:
  • resolves issue #289 for mail configuration being too inflexible (it was not possible to use a local mailer on port 25). Now authenticated mail over port 465 is used if 'username' and 'password' are set, otherwise non-authenticated mail over port 25 is used.
Location:
trunk/grails-app/conf
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/conf/BootStrap.groovy

    r1456 r1459  
    3232                // get configuration
    3333                def config = ConfigurationHolder.config
     34
     35                // set the mail configuration properties in runtime, as
     36                // this is not definable in a .properties file due to the
     37                // fact for the mail properties a map is used
     38                if (config.grails.mail.username && config.grails.mail.password) {
     39                        // use TLS
     40                        config.grails.mail.port = 465
     41                        config.grails.mail.props= [
     42                                "mail.smtp.auth": "true",
     43                                "mail.smtp.socketFactory.port": '465',
     44                                "mail.smtp.socketFactory.class": "javax.net.ssl.SSLSocketFactory",
     45                                "mail.smtp.socketFactory.fallback": "false"
     46                        ]
     47                }
    3448
    3549                // define timezone
  • trunk/grails-app/conf/Config.groovy

    r1443 r1459  
    125125        '/securityinfo/**': ['ROLE_ADMIN']
    126126]
    127 
    128 // default mail configuration, see environment specific properties file
    129 // for real configuration
    130 grails {
    131         mail {
    132                 host = "smtp.gmail.com"
    133                 port = 465
    134                 username = "default_login@gmail.com"
    135                 password = "default_password"
    136                 props = [
    137                         "mail.smtp.auth": "true",
    138                         "mail.smtp.socketFactory.port": '465',
    139                         "mail.smtp.socketFactory.class": "javax.net.ssl.SSLSocketFactory",
    140                         "mail.smtp.socketFactory.fallback": "false"
    141                 ]
    142         }
    143 }
  • trunk/grails-app/conf/config-ci.properties

    r1435 r1459  
    1818
    1919# E-MAIL
    20 # note: currently only authenticated smtp on port 465 is supported
     20# use authenticated smtp (make sure your firewall allows
     21# outbound connections on port 465), or
     22#  - comment username and password to use non-authenticated
     23#    mail (on port 25)
     24#  - comment out all to use local mailer (e.g. postfix /
     25#    sendmail on port 25)
    2126grails.mail.host=smtp.gmail.com
    2227grails.mail.username=gscf.default.installation@gmail.com
  • trunk/grails-app/conf/config-dbnpdemo.properties

    r1435 r1459  
    1818
    1919# E-MAIL
    20 # note: currently only authenticated smtp on port 465 is supported
     20# use authenticated smtp (make sure your firewall allows
     21# outbound connections on port 465), or
     22#  - comment username and password to use non-authenticated
     23#    mail (on port 25)
     24#  - comment out all to use local mailer (e.g. postfix /
     25#    sendmail on port 25)
    2126grails.mail.host=smtp.gmail.com
    2227grails.mail.username=gscf.default.installation@gmail.com
  • trunk/grails-app/conf/config-dbnptest.properties

    r1435 r1459  
    1818
    1919# E-MAIL
    20 # note: currently only authenticated smtp on port 465 is supported
     20# use authenticated smtp (make sure your firewall allows
     21# outbound connections on port 465), or
     22#  - comment username and password to use non-authenticated
     23#    mail (on port 25)
     24#  - comment out all to use local mailer (e.g. postfix /
     25#    sendmail on port 25)
    2126grails.mail.host=smtp.gmail.com
    2227grails.mail.username=gscf.default.installation@gmail.com
  • trunk/grails-app/conf/config-development.properties

    r1435 r1459  
    1717
    1818# E-MAIL
    19 # note: currently only authenticated smtp on port 465 is supported
     19# use authenticated smtp (make sure your firewall allows
     20# outbound connections on port 465), or
     21#  - comment username and password to use non-authenticated
     22#    mail (on port 25)
     23#  - comment out all to use local mailer (e.g. postfix /
     24#    sendmail on port 25)
    2025grails.mail.host=smtp.gmail.com
    2126grails.mail.username=gscf.default.installation@gmail.com
  • trunk/grails-app/conf/config-nmcdsptest.properties

    r1435 r1459  
    1818
    1919# E-MAIL
    20 # note: currently only authenticated smtp on port 465 is supported
     20# use authenticated smtp (make sure your firewall allows
     21# outbound connections on port 465), or
     22#  - comment username and password to use non-authenticated
     23#    mail (on port 25)
     24#  - comment out all to use local mailer (e.g. postfix /
     25#    sendmail on port 25)
    2126grails.mail.host=smtp.gmail.com
    2227grails.mail.username=gscf.default.installation@gmail.com
  • trunk/grails-app/conf/config-production.properties

    r1435 r1459  
    1818
    1919# E-MAIL
    20 # note: currently only authenticated smtp on port 465 is supported
     20# use authenticated smtp (make sure your firewall allows
     21# outbound connections on port 465), or
     22#  - comment username and password to use non-authenticated
     23#    mail (on port 25)
     24#  - comment out all to use local mailer (e.g. postfix /
     25#    sendmail on port 25)
    2126grails.mail.host=smtp.gmail.com
    2227grails.mail.username=gscf.default.installation@gmail.com
  • trunk/grails-app/conf/config-test.properties

    r1435 r1459  
    1717
    1818# E-MAIL
    19 # note: currently only authenticated smtp on port 465 is supported
     19# use authenticated smtp (make sure your firewall allows
     20# outbound connections on port 465), or
     21#  - comment username and password to use non-authenticated
     22#    mail (on port 25)
     23#  - comment out all to use local mailer (e.g. postfix /
     24#    sendmail on port 25)
    2025grails.mail.host=smtp.gmail.com
    2126grails.mail.username=gscf.default.installation@gmail.com
  • trunk/grails-app/conf/config-www.properties

    r1435 r1459  
    1818
    1919# E-MAIL
    20 # note: currently only authenticated smtp on port 465 is supported
     20# use authenticated smtp (make sure your firewall allows
     21# outbound connections on port 465), or
     22#  - comment username and password to use non-authenticated
     23#    mail (on port 25)
     24#  - comment out all to use local mailer (e.g. postfix /
     25#    sendmail on port 25)
    2126grails.mail.host=smtp.gmail.com
    2227grails.mail.username=gscf.default.installation@gmail.com
Note: See TracChangeset for help on using the changeset viewer.