[ 
https://issues.apache.org/jira/browse/EMAIL-86?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Blake Fridman updated EMAIL-86:
-------------------------------

    Description: 
Problem:
We have been using Commons Email for years without issue.  Recently we have 
found a good use case to have non-production environment redirect emails to 
another email address/public outlook folder to make sure our customers are not 
accidentally emailed nor or people in our company sent emails from non-prod 
applications (emails look the same as prod so users have a hard time 
differentiating and some users also get hundreds of emails a day so if we can 
stop them from getting them that would be great).

Proposal: 
I propose exposing the following functionality in 
org.apache.commons.mail.Email.java:
http://java.sun.com/products/javamail/javadocs/javax/mail/Transport.html#send(javax.mail.Message,%20javax.mail.Address[])
Send the message to the specified addresses, ignoring any recipients specified 
in the message itself. The send method calls the saveChanges method on the 
message before sending it.

What's great about this means is that message header still has TO/CC/BCC 
headers as if it was in production so when viewed in a client such as outlook 
looking at the folder the email went to it's easy to sort and see who it's 
intended for (great for Training and SQA departments).

Possible Solutions:
There are a couple of solutions that come to mind that involve modifying 
org.apache.commons.mail.Email.java, hopefully they will help:
- Adding a new Send method that takes in receipients (and clearly states that 
any previous addresses added will be in the email message headers but ignored 
when the email is sent)
- Adding new method addRecipients and if that is called automatically use 
Transport.send(Message msg, Address[] addresses) in place of 
Transport.send(Message msg)
Anything that is added will probably need to be exposed by the classes that 
utilize Email.java (such as HTMLEmail)

  was:
Problem:
We have been using Commons Email for years without issue.  Recently we have 
found a good use case to have non-production environment redirect emails to 
another email address/public outlook folder to make sure our customers are not 
accidentally emailed nor or people in our company sent emails from non-prod 
applications (emails look the same as prod so users have a hard time 
differentiating and some users also get hundreds of emails a day so if we can 
stop them from getting them that would be great).

Proposal: 
I propose exposing the following functionality in 
org.apache.commons.mail.Email.java:
http://java.sun.com/products/javamail/javadocs/javax/mail/Transport.html#send(javax.mail.Message,%20javax.mail.Address[])
_Send the message to the specified addresses, ignoring any recipients specified 
in the message itself. The send method calls the saveChanges  method on the 
message before sending it. _

What's great about this means is that message header still has TO/CC/BCC 
headers as if it was in production so when viewed in a client such as outlook 
looking at the folder the email went to it's easy to sort and see who it's 
intended for (great for Training and SQA departments).

Possible Solutions:
There are a couple of solutions that come to mind that involve modifying 
org.apache.commons.mail.Email.java, hopefully they will help:
- Adding a new Send method that takes in receipients (and clearly states that 
any previous addresses added will be in the email message headers but ignored 
when the email is sent)
- Adding new method addRecipients and if that is called automatically use 
_Transport.send(Message msg, Address[] addresses)_ in place of 
_Transport.send(Message msg)_
Anything that is added will probably need to be exposed by the classes that 
utilize Email.java (such as HTMLEmail)


> Please expose means so that Transport.send(Message msg,  Address[] addresses) 
> may be sometimes called in place of Transport.send(Message msg)
> ---------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: EMAIL-86
>                 URL: https://issues.apache.org/jira/browse/EMAIL-86
>             Project: Commons Email
>          Issue Type: Improvement
>    Affects Versions: 1.1
>            Reporter: Blake Fridman
>
> Problem:
> We have been using Commons Email for years without issue.  Recently we have 
> found a good use case to have non-production environment redirect emails to 
> another email address/public outlook folder to make sure our customers are 
> not accidentally emailed nor or people in our company sent emails from 
> non-prod applications (emails look the same as prod so users have a hard time 
> differentiating and some users also get hundreds of emails a day so if we can 
> stop them from getting them that would be great).
> Proposal: 
> I propose exposing the following functionality in 
> org.apache.commons.mail.Email.java:
> http://java.sun.com/products/javamail/javadocs/javax/mail/Transport.html#send(javax.mail.Message,%20javax.mail.Address[])
> Send the message to the specified addresses, ignoring any recipients 
> specified in the message itself. The send method calls the saveChanges method 
> on the message before sending it.
> What's great about this means is that message header still has TO/CC/BCC 
> headers as if it was in production so when viewed in a client such as outlook 
> looking at the folder the email went to it's easy to sort and see who it's 
> intended for (great for Training and SQA departments).
> Possible Solutions:
> There are a couple of solutions that come to mind that involve modifying 
> org.apache.commons.mail.Email.java, hopefully they will help:
> - Adding a new Send method that takes in receipients (and clearly states that 
> any previous addresses added will be in the email message headers but ignored 
> when the email is sent)
> - Adding new method addRecipients and if that is called automatically use 
> Transport.send(Message msg, Address[] addresses) in place of 
> Transport.send(Message msg)
> Anything that is added will probably need to be exposed by the classes that 
> utilize Email.java (such as HTMLEmail)

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

Reply via email to