Results 1 to 1 of 1
Thread: Need help sending an email
- 03-19-2009, 08:35 PM #1
Member
- Join Date
- Mar 2009
- Posts
- 1
- Rep Power
- 0
Need help sending an email
I've been searching the web the while day and can't find any info that helps me on this so if anyone can give a hand I would REALLY appreciate it.
I am making an application where after a user signs up a jsp page saves his data to a DB, autogenerates a pwd and sends it by email to the user. I have everything working perfectly except for the last part.
How do I send an email on a jsp page? I seen everywhere that I need a smtp server to do this, which I don't currently have set up and am unsure if the server where this will jsp page is going to end up will have one or if I will be able to use it. I know that in PHP you can send an email my simply using
<?php
$to = "recipient@example.com";
$subject = "Hi!";
$body = "Hi,\n\nHow are you?";
if (mail($to, $subject, $body)) {
echo("<p>Message successfully sent!</p>");
} else {
echo("<p>Message delivery failed...</p>");
}
?>
Is there a simple way to send an email on jsp? I'm new to this programming language and this is really frustrating me! So if anyone can please help me!
Similar Threads
-
sending a simple email message via SMTP
By chahhchahh in forum NetworkingReplies: 5Last Post: 03-08-2009, 06:58 PM -
how to send an email
By painamrata in forum JavaServer Pages (JSP) and JSTLReplies: 2Last Post: 02-22-2009, 04:28 PM -
automatic email
By pracheebapate in forum New To JavaReplies: 2Last Post: 01-18-2009, 08:07 PM -
send email using apache commons email
By jnamendi in forum JavaServer Faces (JSF)Replies: 0Last Post: 10-14-2008, 05:55 PM -
sending email without SMTP?
By java_srinivasan in forum Advanced JavaReplies: 1Last Post: 07-23-2008, 03:45 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks