« Return to Thread: SMTP transport with e-mail address in DataBase

Re: SMTP transport with e-mail address in DataBase

by Henry CL Tiong :: Rate this Message:

Reply to Author | View in Thread

I will not write the entire thing here, I think the below will be sufficient for you. :)

You can do something like that in your class file:

UMOMessage response = eventContext.sendEvent(eventContext.getMessage(), uri);
                Object emailAdd = response.getPayload();

Map map = new HashMap();
                map.put("email", emailAdd);
client.send("vm://in", "foobar", map);

then in your Mule config file, you can use ${email} for your other connector

bokc bokc wrote:
Hi,

I'm using Mule 2. Do you have an example, even if it was for Mule1 ?

Youkoun

2008/7/2 coo|dude <cooldude_no1@hotmail.com>:

>
> hhmm.. are you using Mule 1.x or Mule 2.x? I am not so sure about Mule 2.x,
> but in 1.x, you can actually create a normal Java class with getter and
> setter and this getter and setter can be used as part of the properties
> attributes of the router.
>
>
>
> bokc bokc wrote:
> >
> > The 2nd solution look like the best but I don't see how to do this?
> > For The JDBC connector, I know how to do this but how can I use data in
> > payload object in the SQL query?
> >
> > Youkoun
> >
> > 2008/7/1 coo|dude <henry.tiong@customware.net>:
> >
> >>
> >> hhmm..
> >>
> >> 1. You may need to write a custom filtering to grab the email address at
> >> the
> >> router, or
> >> 2. Use JDBC connector to query the database directly to grab the email
> >> address and echo is back to another Mule descriptor, or
> >> 3. Ever thinking of putting the email address onto the Mule's
> environment
> >> properties file and grab the value there?
> >>
> >> cheers,
> >>
> >> bokc bokc wrote:
> >> >
> >> > Hi,
> >> >
> >> > The e-mail address can change in the data base but the frequency is
> >> > unknown.
> >> > I think the easiest way is to put the e-mail in the payload object.
> But
> >> > after I don't know how to take and use it in the the smtp transport.
> >> >
> >> > Youkoun
> >> >
> >> > 2008/7/1 coo|dude <henry.tiong@customware.net>:
> >> >
> >> >>
> >> >> First thing first, is the value of the email address static or it
> will
> >> be
> >> >> changed accordingly (if so, how frequent)?
> >> >>
> >> >>
> >> >> bokc bokc wrote:
> >> >> >
> >> >> > Hi,
> >> >> >
> >> >> > I would like to send e-mail trow smtp transport. But the e-mail
> >> address
> >> >> is
> >> >> > in data base and it depend of data in the payload. Is it possible
> to
> >> >> take
> >> >> > data in the DataBase with the mule ant put it in the e-mail address
> >> of
> >> >> the
> >> >> > smtp transport ?
> >> >> > If not I can put it on the object in the payload. But how can I
> >> extract
> >> >> it
> >> >> > for the smtp transport?
> >> >> >
> >> >> > Youkoun
> >> >> >
> >> >> >
> >> >>
> >> >> --
> >> >> View this message in context:
> >> >>
> >>
> http://www.nabble.com/SMTP-transport-with-e-mail-address-in-DataBase-tp18153616p18211553.html
> >> >> Sent from the Mule - User mailing list archive at Nabble.com.
> >> >>
> >> >>
> >> >> ---------------------------------------------------------------------
> >> >> To unsubscribe from this list, please visit:
> >> >>
> >> >>    http://xircles.codehaus.org/manage_email
> >> >>
> >> >>
> >> >>
> >> >
> >> >
> >>
> >> --
> >> View this message in context:
> >>
> http://www.nabble.com/SMTP-transport-with-e-mail-address-in-DataBase-tp18153616p18212282.html
> >> Sent from the Mule - User mailing list archive at Nabble.com.
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe from this list, please visit:
> >>
> >>    http://xircles.codehaus.org/manage_email
> >>
> >>
> >>
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/SMTP-transport-with-e-mail-address-in-DataBase-tp18153616p18230823.html
> Sent from the Mule - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>
>

 « Return to Thread: SMTP transport with e-mail address in DataBase