title: django sendgrid get error when sending email
body: <p>I set up sendgrid as following and it works perfectly when I use send_mail to send a test message</p>
  <pre><code>EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
  EMAIL_HOST = 'smtp.sendgrid.net'
  EMAIL_HOST_USER = 'apikey'
  EMAIL_HOST_PASSWORD = '******'
  EMAIL_PORT = 587
  EMAIL_USE_TLS = True
  </code></pre>
  <p>Howerver when I implement it with an activation code in views.py for registration as bellow:</p>
  <pre><code>def register(request):
      if request.method == 'POST':
          form = SignUpForm(request.POST)
          if form.is_valid():
              form.save() #completed sign up
              username = form.cleaned_data.get('username')
              password = form.cleaned_data.get('password1')
              user = authenticate(username=username, password=password)
              login(request, user)
              # Create data in profile table for user
              current_user = request.user
              data=UserProfile()
              data.user_id=current_user.id
              data.image=&quot;images/users/user.png&quot;
              data.save()
  
              current_site = get_current_site(request)
              subject = 'Please Activate Your Account'
              # load a template like get_template() 
              # and calls its render() method immediately.
              message = render_to_string('user/activation_request.html', {
                  'user': user,
                  'domain': current_site.domain,
                  'uid': urlsafe_base64_encode(force_bytes(user.pk)),
                  # method will generate a hash value with user related data
                  'token': account_activation_token.make_token(user),
              })
              user.email_user(subject, message)
              return redirect('activation_sent')   
              # messages.success(request, 'Your account has been created!')
              # return HttpResponseRedirect('/')
          else:
              messages.warning(request,form.errors)
              return HttpResponseRedirect('/register')
  
  
      form = SignUpForm()
      #category = Category.objects.all()
      context = {
                 'form': form,
                 }
      return render(request, 'user/register.html', context)
  </code></pre>
  <p>It throws out this error:</p>
  <pre><code>SMTPDataError at /register
  (550, b'The from address does not match a verified Sender Identity. Mail cannot be sent until this error is resolved. Visit https://sendgrid.com/docs/for-developers/sending-email/sender-identity/ to see the Sender Identity requirements')
  </code></pre>
  <p>I have verified the sender and that's why It works with send_mail but it doesn't work with activation code.</p>
  <p>Please someone have a look for me.</p>
  <p>Thanks</p>