Grails Mail plugin: Can it skip sending mails to reserved domain names, like to foouser@example.org?

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Grails Mail plugin: Can it skip sending mails to reserved domain names, like to foouser@example.org?

Roshan Dawrani
Hi,

RFC2606 [1]'s section 3 (Reserved Example Second Level Domain Names) defines some domain names as reserved so that they can be used in examples, e.g.: example.com, example.net, example.org.

Can Grails' mail plugin provide this feature to skip sending real mails to mail-ids based on these domains? Does it already provide such a feature?


--
Roshan
Reply | Threaded
Open this post in threaded view
|

Re: Grails Mail plugin: Can it skip sending mails to reserved domain names, like to foouser@example.org?

ld@ldaley.com
On 11 Jan 2012, at 8:23, Roshan Dawrani wrote:

> RFC2606 [1]'s section 3 (Reserved Example Second Level Domain Names)
> defines some domain names as reserved so that they can be used in
> examples, e.g.: example.com, example.net, example.org.
>
> Can Grails' mail plugin provide this feature to skip sending real
> mails to mail-ids based on these domains? Does it already provide such
> a feature?
> [1] - http://tools.ietf.org/html/rfc2606

Only if javax.mail:mail:1.4.3 does. The mail plugin doesn't so any
special handling of these domains.

I'm not sure what you want to use this for, but if it's for testing you
should look into the greenmail plugin.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: Grails Mail plugin: Can it skip sending mails to reserved domain names, like to foouser@example.org?

Roshan Dawrani
On Wed, Jan 11, 2012 at 4:18 PM, [hidden email] <[hidden email]> wrote:
On 11 Jan 2012, at 8:23, Roshan Dawrani wrote:

Only if javax.mail:mail:1.4.3 does. The mail plugin doesn't so any special handling of these domains.

Will it be a bad idea for mail plugin to do special handling there?
 
I'm not sure what you want to use this for, but if it's for testing you should look into the greenmail plugin.

Hmm, it is not needed for standalone testing of our grails app. We want to run functional tests on an externally running application, where mail-sending is enabled and not greenmail-ed, and we would like actual mail-sending to skip mailing to, say, @example.org mail addresses so that they don't bounce off.

--
Roshan
Reply | Threaded
Open this post in threaded view
|

Re: Grails Mail plugin: Can it skip sending mails to reserved domain names, like to foouser@example.org?

lucastex
IMO, I think the plugin should be just a wrapper over the library, so this kind of behaviour should be in the library and not in the plugin.

You can use "grails.mail.disabled=true" in test environment to disable mail sending just in this environment.

Fit?


[]s,




On Wed, Jan 11, 2012 at 8:57 AM, Roshan Dawrani <[hidden email]> wrote:
On Wed, Jan 11, 2012 at 4:18 PM, [hidden email] <[hidden email]> wrote:
On 11 Jan 2012, at 8:23, Roshan Dawrani wrote:

Only if javax.mail:mail:1.4.3 does. The mail plugin doesn't so any special handling of these domains.

Will it be a bad idea for mail plugin to do special handling there?
 
I'm not sure what you want to use this for, but if it's for testing you should look into the greenmail plugin.

Hmm, it is not needed for standalone testing of our grails app. We want to run functional tests on an externally running application, where mail-sending is enabled and not greenmail-ed, and we would like actual mail-sending to skip mailing to, say, @example.org mail addresses so that they don't bounce off.

--
Roshan

Reply | Threaded
Open this post in threaded view
|

Re: Grails Mail plugin: Can it skip sending mails to reserved domain names, like to foouser@example.org?

Roshan Dawrani
On Wed, Jan 11, 2012 at 4:43 PM, Lucas F. A. Teixeira <[hidden email]> wrote:
IMO, I think the plugin should be just a wrapper over the library, so this kind of behaviour should be in the library and not in the plugin.

You can use "grails.mail.disabled=true" in test environment to disable mail sending just in this environment.

Fit?

Not fit. Because the functional tests are hitting an external application running in "prod" mode, where mail sending cannot be disabled. We use mail-disabling in "test" environment and also "greenmail" where it makes sense.

I guess it will be a much longer loop to have it fixed in the "library", so was just checking if there was any interest in providing this support through the plugin as an intermediate solution? Or, at least a hook that we can utilize at our app level to devide such domains should be skipped.

As far as I saw, the mail plugin doesn't provide any such hook too.

--
Roshan