title: How to send a email from a form django
body: <p>As the title says i am trying to send a email from a form, but is not working:</p>
  
  <p>As you can see:</p>
  
  <pre><code>&lt;form method="POST" action=''&gt;
        {% csrf_token %}
        &lt;div class="control-group form-group"&gt;
          &lt;div class="controls"&gt;
            &lt;label&gt;Nombre completo:&lt;/label&gt;
            &lt;input type="text" class="form-control" id="nombre" required data-validation-required-message="Introduzca su nombre."&gt;
            &lt;p class="help-block"&gt;&lt;/p&gt;
          &lt;/div&gt;
        &lt;/div&gt;
        &lt;div class="control-group form-group"&gt;
          &lt;div class="controls"&gt;
            &lt;label&gt;Asunto:&lt;/label&gt;
            &lt;input type="text" class="form-control" id="asunto" required data-validation-required-message="Introduzca el asunto del correo."&gt;
          &lt;/div&gt;
        &lt;/div&gt;
        &lt;div class="control-group form-group"&gt;
          &lt;div class="controls"&gt;
            &lt;label&gt;Correo Electrónico:&lt;/label&gt;
            &lt;input type="email" class="form-control" id="email" required data-validation-required-message="Introduzca su correo electrónico."&gt;
          &lt;/div&gt;
        &lt;/div&gt;
        &lt;div class="control-group form-group"&gt;
          &lt;div class="controls"&gt;
            &lt;label&gt;Mensaje:&lt;/label&gt;
            &lt;textarea rows="10" cols="100" class="form-control" id="contenido" required data-validation-required-message="Escriba su mensaje" maxlength="999" style="resize:none"&gt;&lt;/textarea&gt;
          &lt;/div&gt;
        &lt;/div&gt;
        &lt;button type="submit" class="btn btn-primary"&gt;Enviar mensaje&lt;/button&gt;
      &lt;/form&gt;
  </code></pre>
  
  <p>This is my view:</p>
  
  <pre><code>def contact(request):
  
  contactdata = contactData.objects.get()
  members = teamMembers.objects.filter(existencia=True)
  templates = Templates.objects.get(isSelected=True)
  categoria = Clasificacion.objects.filter(existencia=True)
  enterprise = enterprisedata.objects.get()
  content = request.POST.get('contenido', '')
  name = request.POST.get('nombre', '')
  email = request.POST.get('email', '')
  subject = request.POST.get('asunto', '')
  if request.method == 'POST' and email and name:
      send_mail(subject, content, email, ['kike1996@hotmail.com'], fail_silently=False)
  contexto = {'categoria':categoria,'templates':templates,'members':members,
              'contactdata':contactdata,'enterprise':enterprise}
  return render(request, 'contact/contact.html', contexto)
  </code></pre>
  
  <p>I am calling the form with the POST request, but is not sending anything!.</p>
  
  <p>Hope you can help me, thank you!.</p>