I have already searched it through what could be the possible reason for not being able to send a single email as a site guest user on force.com site in salesforce
- Site guest user's email should be valid
- Site guest user has all the permission for sending email in public access
- Site guest user has all the required permission for the vf page along with the apex class
furthermore, I checked all the debug logs for the event and I couldn't find anything unusual
this is my demo code which is perfectly working fine for the admin user
// to.add(quoterec.OwnerId);
to.add('[email protected]');
Messaging.SingleEmailMessage email = new Messaging.SingleEmailMessage();
email.setSubject('Quote Accepted by Customer');
email.setToAddresses(to);
email.setHtmlBody('Quote Accepted by Customer');
Messaging.sendEmail(new Messaging.SingleEmailMessage[] { email });
System.debug('Test: Check Debug log ==> ' + email);