Hi
I use the code below to send email in a user control and it works fine.
EmailMessage email = new EmailMessage();
        email.From = "test@afpco.ir";
        email.Recipients = ValidationHelper.GetString("mj.yazdani1988@gmail.com", "mj.yazdani1988@gmail.com");
        email.Subject = "Subject";
        email.Body = "Body of the email";
        EmailSender.SendEmail(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("test@afpco.ir").