SecurityException: solicitud de permiso del tipo 'System.Net.Mail.SmtpPermission'

Este es uno de los mensajes de 'funciona localmente, no funciona en el servidor'.

Tengo un formulario de contacto simple que envía un correo electrónico. En el servidor, obtengo la siguiente excepción:

 Security Exception
Description: The application attempted to perform an operation not allowed
by the security policy.  To grant this application the required permission
please contact your system administrator or change the application's trust
level in the configuration file.

Exception Details: System.Security.SecurityException: Request for the
permission of type 'System.Net.Mail.SmtpPermission, System, Version=4.0.0.0, 
Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.

Source Error:
[No relevant source lines]

El host no pudo darme el código o un cliente SMTP que funcionará para enviar mensajes SMTP desde el servidor web. Por lo tanto, tengo que encontrar una forma alternativa de enviarlos que haga que mi servidor web esté satisfecho con una política de seguridad estricta.

Aquí está el código fuente:

private void SendMessage (string returnAddress, string textSubject, string messageText)
    {
        config config = new config();

        System.Net.Mail.MailMessage message = new System.Net.Mail.MailMessage();

        message.To.Add(config.toEmailAddress);
        message.Subject = "Website Contact Form Message: " + textSubject;
        message.From = new System.Net.Mail.MailAddress(returnAddress);
        message.Body = messageText;

        message.IsBodyHtml = false;

        System.Net.Mail.SmtpClient smtp = new System.Net.Mail.SmtpClient("smtp.naturalcarpetcompany.com");
        smtp.Credentials = new System.Net.NetworkCredential(config.fromEmailAddress, config.fromEmailPassword);
        smtp.Port = 587;

        try
        {
            smtp.Send(message);
        }
        catch (Exception ex)
        {
            Exception ex2 = ex;
            string errorMessage = string.Empty;
            while (ex2 != null)
            {
                errorMessage += ex2.ToString();
                ex2 = ex2.InnerException;
            }
            HttpContext.Current.Response.Write(errorMessage);
        }
    }

Respuestas a la pregunta(2)

Su respuesta a la pregunta