synapse-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eric Nygma" <profoundmyst...@gmail.com>
Subject Re: Mail sending : how to configure mail subject and other details
Date Wed, 05 Dec 2007 07:36:29 GMT
Hi Ruwan,

Please see inline ...

On Dec 5, 2007 9:53 AM, Ruwan Linton <ruwan.linton@gmail.com> wrote:

> Eric,
>
> Sorry for the late, we have forwarded this to the set of people who did
> the
> SMTP transport on axis2 (which is what we are using for mail sending) and
> following is the response we got from them. (If you are in the synapse-dev
> list you could have already seen this, in which case just ignore this)
>
> quote >>
> Hi,
>
>
> It was nice to see the support to send emails in Synapse1.1. I followed
> the
> docs to enable mail transport.
> I tried sample 255, which has a 'mail' address endpoint. One thing I
> noticed
> was that the mail is always sent with a default subject : " __ Axis2/Java
>
> Mail Message __ ".
>
> According to http://people.apache.org/~pzf/SMTPBase64Binding.html<http://people.apache.org/%7Epzf/SMTPBase64Binding.html>
> <http://people.apache.org/%7Epzf/SMTPBase64Binding.html> - SMTP/MIME
> Base64 transport binding spec
>
> - which Axis2 mail transport has been formulated, it does not speak
> about the subject. Thus, in Axis2 1.3 we did not
> give provision to change the subject. If this is a real requirement,
> we would change this in the next Axis2 release.
>
>
> Is there some way I can override this default and put in a user-supplied
> value.
>
> Also, is there a way to specify the 'cc', 'bcc' fields when sending mails
> ?
>
>
> Again the SMTP/MIME spec did not mentioned about cc and bcc. Thus, we
> did not include this in Axis2 1.3.
>
> We would be greatly appreciated it you could provide us with user
> cases, thus we could include the subject, cc and bcc into the spec.


Yes,we have usecases where in it is needed to override the subject/To/CC/BCC
fields and also specify the message text in the mail body.
For instance, when using Synapse to mediate a response for a webservice
endpoint, based on the value returned by say, a StockQuoteService , a mail
would be sent to a set of people.It would be nice to be able to specify the
recipients, and the subject heading and the message text in the synapse
configuration by way of parameters/properties (axis2/synapse/transport).

Also, the mail body contains the soap body or the POX payload. Is it
possible to send only the text without the enclosing xml tags.

I chanced to see that the default subject : " __ Axis2/Java Mail Message __
" was hardcoded in org.apache.axis2.transport.mail.EMailSender class. Can
that be modified to accept values for subject/mail text/ to/cc/bcc from
Synapse as Synapse or Axis2 message context properties.

Thanks again,
Eric.



>
>
>
> Thank you
>
> Saminda
>
> Thanks,
> Ruwan
>
> On Dec 3, 2007 4:51 PM, Eric Nygma <profoundmystery@gmail.com> wrote:
>
> > Hi,
> >
> > It was nice to see the support to send emails in Synapse1.1. I followed
> > the
> > docs to enable mail transport.
> > I tried sample 255, which has a 'mail' address endpoint. One thing I
> > noticed
> > was that the mail is always sent with a default subject : " __
> Axis2/Java
> > Mail Message __ ".
> >
> > Is there some way I can override this default and put in a user-supplied
> > value.
> >
> > Also, is there a way to specify the 'cc', 'bcc' fields when sending
> mails
> > ?
> >
> > Thanks in advance,
> > Eric.
> >
>
>
>
> --
> Ruwan Linton
> http://www.wso2.org - "Oxygenating the Web Services Platform"
>

Mime
View raw message