title: How to make sure email is not received in spam when sent with Django EmailMessage class?
body: <p>I have the following settings in my <code>settings.py</code> file.</p>
  
  <pre><code>EMAIL_HOST = 'mail.domain.com'
  EMAIL_HOST_USER = 'me@domain.com'
  EMAIL_HOST_PASSWORD = 'mypassword'
  EMAIL_PORT = 587
  EMAIL_USE_TLS = True
  </code></pre>
  
  <p>A user in my Django application is able to send an email to a client with a PDF attachment using the <code>EmailMessage</code> class. Here is the code:</p>
  
  <pre><code>email = EmailMessage()
  email.subject = 'Demo subject'
  email.body = self.request.GET.get('email_body', '')
  email.from_email = 'Full Name &lt;user@domain.com&gt;'
  email.to = ['{}'.format(self.request.GET.get('to_address'))]
  
  email.attach_file(os.path.join(settings.MEDIA_ROOT, 'quotation_email.pdf'))
  
  email.send()
  </code></pre>
  
  <p>My questions are,</p>
  
  <ol>
  <li><p>Since I can create a code to send the email as a different person, will the email not be marked as spam in certain domains?</p></li>
  <li><p>I have access to a mail server which is already setup. Can I map the email accounts to the user accounts in the Django application in such a way that Django uses the email server as a medium to send email based on the logged in users?</p></li>
  <li><p>Why do I need to provide an email and password in <code>settings.py</code> file when I may never use that email account to send any mail? Can I not log in to the email every time someone sends an email?</p></li>
  </ol>