You need to sign in to do that
Don't have an account?
jagdish sati
problem on sending email
Guys I need a little help from u.
Below is the code for sending email.It works properly in another user account but when I use in my system it does not work.So please told what is the necessary setting for sending mail.I have already done Email Deliverability to All Email.
apex class
public class mainEmail{
public static void mailSend(){
List<Messaging.SingleEmailMessage> mails = new List<Messaging.SingleEmailMessage>();
Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage();
List<String> sendTo = new List<String>();
sendTo.add('sati.jagdish912@gmail.com');
mail.setToAddresses(sendTo);
mail.setReplyTo('sati.jagdish5@gmail.com');
mail.setSenderDisplayName('Jagdish');
mail.setSubject('URGENT BUSINESS PROPOSAL');
mail.setHtmlBody('hhhihisadhuihd');
mails.add(mail);
Messaging.sendEmail(mails);
}
}
vfpage
<apex:page controller="mainEmail" action="{!mailSend}">
</apex:page>
Below is the code for sending email.It works properly in another user account but when I use in my system it does not work.So please told what is the necessary setting for sending mail.I have already done Email Deliverability to All Email.
apex class
public class mainEmail{
public static void mailSend(){
List<Messaging.SingleEmailMessage> mails = new List<Messaging.SingleEmailMessage>();
Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage();
List<String> sendTo = new List<String>();
sendTo.add('sati.jagdish912@gmail.com');
mail.setToAddresses(sendTo);
mail.setReplyTo('sati.jagdish5@gmail.com');
mail.setSenderDisplayName('Jagdish');
mail.setSubject('URGENT BUSINESS PROPOSAL');
mail.setHtmlBody('hhhihisadhuihd');
mails.add(mail);
Messaging.sendEmail(mails);
}
}
vfpage
<apex:page controller="mainEmail" action="{!mailSend}">
</apex:page>
Vinit_Kumar
The way I would approach is to check the debug logs and see what is happening there ??