Share on Google+Share on Google+

Akhilesh Kumar
forgot password
2 Answer(s)      8 years ago
Posted in : Struts

Ads

View Answers

October 16, 2008 at 12:38 PM



import java.io.*;

import javax.mail.*;

import javax.mail.internet.*; // important

import javax.mail.event.*; // important

import java.net.*;

import java.util.*;

public class Mail
{

public static void main(String args[])



{


try

{

Properties props=new Properties();

props.put("mail.smtp.host","XXXXXXXX"); //write the mail server there
Session session1 = Session.getDefaultInstance(props,null);

String s1 = "[email protected]";//sender's mail id
String s2 = "[email protected]";//receiver's mail id

String s3 = "MAIL";

String s4 = "this is an automated mail";

Message message =new MimeMessage(session1);

message.setFrom(new InternetAddress(s1));

message.setRecipients

(Message.RecipientType.TO,InternetAddress.parse(s2,false));

message.setSubject(s3);

message.setText(s4);

Transport.send(message);

System.out.println("mail has been sent");

}

catch(Exception ex)

{

System.out.println("ERROR....."+ex);

}

}

}

thanks and regards
prashu
[email protected]



October 16, 2008 at 3:15 PM


Hi friend,


Please explain which technologies you want to use.

java
jsp
servlets
struts2.0


Thanks.









Related Tutorials/Questions & Answers:
forgot password?
forgot password?  forgot password
Forgot password
Forgot password  hi i want to develop a code for when user clicks on forgot password then the next page should be enter his mobile no then the password must be sent to his mobile no...! Thanks in advance Nag Raj
Advertisements
coding for forgot password
coding for forgot password  coding for forgot password
Forgot Password of Application
Forgot Password of Application  Forgot Password of Application through servlet and jsp
Forgot Password of Application
Forgot Password of Application  i want sample code for Forgot Password of Application
forgot password code in jsp
forgot password code in jsp  forgot password code in jsp   Please visit the following link: http://www.roseindia.net/jsf/richfaces
Coding for forgot password
Coding for forgot password  coding for forgot password   Please go through the following links: http://www.roseindia.net/jsf/richfaces/ http://www.roseindia.net/struts/hibernate-spring/ Here you will find a jsf
forgot password - Struts
forgot password  i want to proper code for forgot password, means how to send password into email id if i forgot my password   import java.io.*; import javax.mail.*; import javax.mail.internet.*; // important
Developing Forgot Password Form
Developing Forgot Password Form       In this section we will develop Forgot Password Form code for our application. Developing Forgot Password Form  
Forgot Password Action,Struts Forgot Password Action class
Forgot Password Action       Forgot Password Action The password forgot Action is invoked when you forgot your password and want to recover the password. The forgot
Forgot Password Screen of Application
Forgot Password Screen of Application       Forgot Password Screen our web application allows... is displayed. With the help of this screen user can retrieve their password.  Forgot
Send forgot Password through mail - JSP-Servlet
Send forgot Password through mail   hello every one I am designing a admin login page where i am validating the password through file(Example... is provided) Now my question is how do i send the password if admin click on forgot
Password need to encrypt while inserting into DB and need to decrypt while responding to forgot password
responding to forgot password. please help me out. Regards, GRR...Password need to encrypt while inserting into DB and need to decrypt while responding to forgot password  Hi, I need the functionality in JSP
Password need to encrypt while inserting into DB and need to decrypt while responding to forgot password
Password need to encrypt while inserting into DB and need to decrypt while responding to forgot password  Hi, i encrypt password and stored in to DB.but i dont know decrypt that password.plz send the code.in your site link
Password
Password  make a program which ask ask the username and password * in this format. in C language
forget password
forget password  can i get coding for forgot password in jsp, need using javamail also cannot.. what should i do?? Thx
how to forget password in spring framework
://www.roseindia.net/struts/hibernate-spring/forgot-password-action.shtml   Please.../ http://www.roseindia.net/struts/hibernate-spring/forgot-password-action.shtml...how to forget password in spring framework  how to forget password
recovery of password through mail
user account should be verified and if they forgot password then security question should be provided ,if they answer then their password must be sent...recovery of password through mail  hi i want code for login page
password check
password check  how to check sighup passowrd and login password
change password
change password  how to change password in the login form.... by giving options to user like this old password, new password.. pls help
Reset Password
Reset Password  coding for reset password
retype password
retype password  coding for retype password
forget password
forget password  codding for forget password using spring framework
forget password?
forget password?  can anyone help me? how to create a module of forget password?the password can reset by generate random password and send to user's email..i develop the php system using xampp and dreamweaver
forget password?
forget password?  can anyone help me? how to create a module of forget password?the password can reset by generate random password and send to user's email..i develop the php system using xampp and dreamweaver
3D PASSWORD
3D PASSWORD  HI i would like to know abt where the 3d password in india used and also few info about the 3d password pls rply some1 as soon as possible
password change
password change  Hi , I am using jsf and trying to write a code to change the password of a user . Ihave to retrine userid fromdata base how to do that using session
Password validation
password and confirm password are same or not Validation  Hi. I have a change password form. In that i have to check the values given in the new password and confirm password are same or not. Please help.   Here
Password validation
Password validation  Hi. I have a change password form. In that i have to check the values given in the new password and confirm password are same or not. Please help.   Here is a code that accepts the current password
Password validation
Password validation  Hi. I have a change password form. In that i have to check the values given in the new password and confirm password are same or not. Please help.   Here is a code that accepts the current password
Password validation
Password validation  Hi. I have a change password form. In that i have to check the values given in the new password and confirm password are same or not. Please help.   Here is a code that accepts the current password
Tutorials   
Java Spring Hibernate Struts Training Dynamic tabs in struts 1.2 Unable to upload a file to mysql database using struts1 Pagination in struts 2 struts2 filterdispatcher is deprecated please use the new filters viewing How to add struts2 dependency in Maven? Struts Exception Handling can you check below code if any erors multimedia how to display the value of termcell name in label class not found exception Where to learn Struts 2? dropdown cacheing Upload and Download Large files in jsp What is Struts 2 framework struts and hibernate based health care project source code struts and hibernate based health care project source code Struts 2 Integration with Struts 1 About captcha of strut2 About captcha of strut2 Which is the good website for struts 2 tutorials? advance java source code source code In Struts 2 how to pass the Struts struts internationalization for Korean language struts2 Struts2 and Hibernate Fetch Data Base Value Struts2 and Hibernate Fetch Data Base Value Struts2 and Hibernate i want to create an application with only a button which on click displays table from database using struts2 and hibernate on eclipse Struts2 and Hibernate Struts2 and Hibernate Struts2 validation Procedure Struts2 validation Procedure Struts2 validation Procedure Struts2 validation Procedure Struts 2 action-validation.xml not loading Struts-2 and Ajax integration STRUTS QUESTION conerting web project into .exe file About Select tag ScartApplication aplicacion ecommerce struts 1.3 struts 1.3 sms prob Need to know struts1 all jar file names struts with hibernate

Ads

 
Advertisement null

Ads