You need to sign in to do that
Don't have an account?
vibration
when clicking a button, mail will send correspondind address.(vf code)
invoice num
price
when clicking a button, mail will send correspondind address.
plz explain step by step
1)Vf code
2)class file
Hi,
Public class sendmail()
{
String sendpassword(mailid,password)
{
Messaging.SingleEmailMessage mail=new Messaging.SingleEmailMessage();
String[] toAddresses =new String[] {mailid};
Mail.setToAddresses(toAddresses);
Mail.setReplyTo(‘community@gmail.com’);
Mail.setSenderDisplayName(‘LMS Support U R Password is……..’);
Mail.setSubject(‘U r LMS Password is sent,check u r mail’);
Mail.setBccSender(false);
Mail.setUseSignature(false);
Mail.setPlainTextBody(‘ We r from LMS,U r LMS Password is:’+password);
Mail.setHtmlBody(‘ LMS Password is:<b>’+ password +’</b>’);
Messaging.sendEmail(new Messaging.SingleEmailMessage[] {Mail});
}
}
Vfpage
<apex:commandButton value="send" Action={!sendmail}>
All Answers
Hi,
Public class sendmail()
{
String sendpassword(mailid,password)
{
Messaging.SingleEmailMessage mail=new Messaging.SingleEmailMessage();
String[] toAddresses =new String[] {mailid};
Mail.setToAddresses(toAddresses);
Mail.setReplyTo(‘community@gmail.com’);
Mail.setSenderDisplayName(‘LMS Support U R Password is……..’);
Mail.setSubject(‘U r LMS Password is sent,check u r mail’);
Mail.setBccSender(false);
Mail.setUseSignature(false);
Mail.setPlainTextBody(‘ We r from LMS,U r LMS Password is:’+password);
Mail.setHtmlBody(‘ LMS Password is:<b>’+ password +’</b>’);
Messaging.sendEmail(new Messaging.SingleEmailMessage[] {Mail});
}
}
Vfpage
<apex:commandButton value="send" Action={!sendmail}>
Thanks.
a)when i click a button all the inventory details send to the corresponding address
plz send details