sending mails with different domain names in python
Question: I'm getting "SMTP AUTH extension not supported by server" while sending mails
with different domain names. For example, I have sent mails using
person@example.com. Here my domain is example.com.

when I trying send mail I am getting "SMTP AUTH extension not supported by
server" error

## here is my code

**settings.py**

    
    
    EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
    EMAIL_HOST = 'smtp.somedomain.com'
    EMAIL_HOST_USER = 'Admin@somedomain.com'
    EMAIL_HOST_PASSWORD = '***********'
    EMAIL_PORT = 25
    EMAIL_USE_TLS = True
    

**views.py**

    
    
    msg = "Hi,this is testing mail."
    try:
        send_mail('Appointment mail',msg,'',['user@somedomain.com'])
        response = 'Message sent successfully.You will receive response in very soon.Thank you.' 
    except Exception as e:
        response = e
    return HttpResponse(response)
    

Can anyone help me, Thanks in advance!


Answer: I think this could help you. [Getting 'str' object has no attribute 'get' in
Django](http://stackoverflow.com/questions/22788135/getting-str-object-has-no-
attribute-get-in-django). You cannot return 'str' directly as a response. You
need HttpResponse

    
    
    from django.http import HttpResponse
    return HttpResponse(response)
    

Hope this helps.

