Here is a method that fires when a guest enters their name and email address into a visualforce page and clicks submit. The email is being sent fine, but the primary contact on the org is also getting put in to the "To" field. A system.debug shows the the primary contact email address is not in the email list when I do the system.debug. Where, when, and why is this person's address getting added? I do not want them to get an email every time someone registers.
public pageReference makePendingUser(){
List<EmailTemplate> templates = [SELECT Id FROM EmailTemplate WHERE DeveloperName = 'Community_New_Member_Welcome_Email'];
String templateId = templates[0].Id;
List<Messaging.Email> emails = new List<Messaging.Email>();
User randomUser = [SELECT Id FROM User LIMIT 1];
OrgWideEmailAddress admissionsEmail = [SELECT Id FROM OrgWideEmailAddress WHERE DisplayName = 'Admissions' LIMIT 1];
List<String> emailAddresses = new List<String>();
newUser.Random_String__c = createRandomString();
insert newUser;
emailAddresses.add(newUser.Email__c);
Messaging.SingleEmailMessage email = new Messaging.SingleEmailMessage();
email.setTemplateId(templateId);
email.setTargetObjectId(randomUser.Id);
email.setToAddresses(emailAddresses);
email.setOrgWideEmailAddressId(admissionsEmail.id);
email.saveAsActivity = false;
emails.add(email);
Messaging.sendEmail(emails);
return null;
}