Forums Register Login

How to send an automated mail upon registration?

+Pie Number of slices to send: Send
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 .

Thanks
+Pie Number of slices to send: Send
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
+Pie Number of slices to send: Send
+Pie Number of slices to send: Send
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 ? )
+Pie Number of slices to send: Send
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.

Bill
+Pie Number of slices to send: Send
Originally Posted by Chetan Parekh


The Quintessential Program to Send E-Mail [J2EE]


What are the changes required in this particular program if I want to use IMAP instead of SMTP.

Thanks & Regards.
Harshad
+Pie Number of slices to send: Send
IMAP (like POP3) is a protocol for accessing mail stores, i.e. for receiving mail, not for sending mail. You'll have to use SMTP.
Without subsidies, chem-ag food costs four times more than organic. Or this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 877 times.
Similar Threads
Disable "forward/reply" option in an email
opening default mail-client from java
kill all user sessions
sending mail
Freelance Project Offered
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 12:05:12.