You need to sign in to do that
Don't have an account?
rajesh k 10
How to write a code for forgot password?
Hi,
I gave username and password .user forgot password on that time i gave forgotpassword link ,when user click fargot password ling that link pagerefers to Username page.Here I gave username(this username is there in Customobject__ c object) textbox when i enter username click submit, automatically sent new password to my mail how?
please help me..........
I gave username and password .user forgot password on that time i gave forgotpassword link ,when user click fargot password ling that link pagerefers to Username page.Here I gave username(this username is there in Customobject__ c object) textbox when i enter username click submit, automatically sent new password to my mail how?
please help me..........
Try like this,
use one method, do query using username and fetch password and create single email functionality to send password to perticular email.
select id,Name,Password__c,Username__c from Customobject__c where Username__c =:username
If this is helps you, close the question by choosing a best answer.
In my customobject__c record username is there, when i enter username click submit,automatically how to send that username related password to email using singleEmailMessaging.
please help me...
In google i saw like this code send emails
Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage();
String[] ToAddresses = new String[] {'mahesh060708@gmail.com'};
mail.setToAddresses(ToAddresses);
mail.setSubject('Apex Batch Job is done for insertion');
mail.setPlainTextBody('The batch Apex job processed ');
Messaging.sendEmail(new Messaging.SingleEmailMessage[] { mail });
Like
Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage();
String[] ToAddresses = new String[] //Here how i add my email address;
mail.setToAddresses(ToAddresses);//Here how give password like {!customobject__C.password}
mail.setSubject('Apex Batch Job is done for insertion');
mail.setPlainTextBody('The batch Apex job processed ');
Messaging.sendEmail(new Messaging.SingleEmailMessage[] { mail });
Here where i will set my entered user name like(contact.username). and how to set plain text body.
I am a new in sending emails ,please help me.......
List<String> ToAddresses = new List<String>;
ToAddresses.add('someone@salesforce.com');
mail.setToAddresses(ToAddresses);
mail.setSubject('Password Reminder');
mail.setPlainTextBody('Password: ' + password__c);
Messaging.sendEmail(new Messaging.SingleEmailMessage[] { mail });