Hi friends, In my portal project, we have a requirement: Requirement: When a user is registered (new user created), a mail needs to be sent to the administrator.
I need a headstart on this, it would be simpler for me if you could suggest links/resources (containing examples) that explain how this can be done .
not that hard get a mailsession from the container (see admin) (or, not as good: create your own) create a javax.mail.Message with the session. Populate it and send. see javax.mail package for details
Thanks for the 2 responses, they provided an insight into the mail api. but am getting more greedy here; Is there an example that caters exactly to the requirement provided by my boss? (Why make a design, when there is already an existing design pattern ? )
William Brogden
,
Author and all-around good cowpoke
Remember to provide for the situation in which the mail server is slow or not available. In other words, don't make the response wait on the mail sending process.