How to use variable in MailMessage To?

I’m trying to set the To in a MailMessage from a string variable (forwardEmail) but it doesn’t ever send an email or even throw and exception, it shows it was sent successful but it never sends.

public string forwardEmail = "";
public string fromEmail = "";
public string password = "";
public string subject = "Test subject"

public void SendEmail(string body)
    MailMessage mail = new MailMessage();
    mail.IsBodyHtml = true;
    mail.From = new MailAddress(fromEmail);
    mail.To.Add(forwardEmail); //<-------Doesn't work but mail.To.Add("") does?
    mail.Subject = "Test Smtp Mail";
    mail.Body = body;
    SmtpClient smtpServer = new SmtpClient("");
    smtpServer.Port = 587;
    smtpServer.Credentials = new System.Net.NetworkCredential(fromEmail, password) as ICredentialsByHost;
    smtpServer.EnableSsl = true;
    ServicePointManager.ServerCertificateValidationCallback =
    delegate (object s, X509Certificate certificate, X509Chain chain, SslPolicyErrors sslPolicyErrors)
    { return true; };
    catch (System.Exception)
        sendingText.text = "Email not sent";
        sendingText.text = "Email was sent!;

Whats weird is if I set the mail.To.Add() parameter directly like mail.To.Add("") it works fine. I’m not sure why mail.To.Add(forwardEmail) is not working from a variable because I am setting the mail.From() mail.Subject() and mail.Body() from string variables and they are working fine but only if I directly set the mail.To.Add("") directly and not a variable. I have doubled checked the the forwardEmail is correct, double checked and removed white space in the string, the forwardEmail is always correct, I don’t know what else to try, any help would be appreciated.

This is very unlikely. I suspect that you edited the address in the inspector. Since your “forwardEmail” variable is public it will be serialized by Unity. So check the inspector what exactly is serialized in that field. The address you assigned in the field initializer is irrelevant.