aspx send mail as spam
<p>app.config</p>

<pre><code> &lt;system.net&gt;
    &lt;mailSettings&gt;
      &lt;smtp deliveryMethod="Network"&gt;
        &lt;network defaultCredentials="false" host="smtp.gmail.com" password="aaa" port="587" userName="noreplay@aaa.si" /&gt;
      &lt;/smtp&gt;
    &lt;/mailSettings&gt;
  &lt;/system.net&gt;
</code></pre>

<p>C# code:</p>

<pre><code> MailMessage message = new MailMessage(email.From,
                                                      email.To,
                                                      email.Subject,
                                                      email.Body);

                message.IsBodyHtml = true;
                SmtpClient client = new SmtpClient();
                client.UseDefaultCredentials = false;
                client.EnableSsl = true;
                client.Send(message);
</code></pre>

<p>And mail is sent like spam. problem must be in Credentials but i do not know where. Can someone tell me what i must do that mail will not be send as spam?</p>

<p>Thx</p>
