I use the code below to send email in a user control and it works fine.
EmailMessage email = new EmailMessage();
email.From = "firstname.lastname@example.org";
email.Recipients = ValidationHelper.GetString("email@example.com", "firstname.lastname@example.org");
email.Subject = "Subject";
email.Body = "Body of the email";
the " email.From " is the email that I registered in cmssitemanager>settings>emails>SMTP server user.
It would be change after site upload. how can I get "SMTP server user" from site setting and replace it with this static email("email@example.com").