Send email django from any host
Question: I have read plenty of links for sending emails through django. I've tried all
of them but they don't work. I tried sending an email through the python shell
and I get '1'. \- So what are the settings that I should use for the email to
work, I'm willing to use any mail server? \- I was using gmail but I read that
it causes problems, if I'm going to use hotmail for example do I need to
specify the email password in the settings.xml? \- how to debug this problem?


Answer: You can try yagmail, it should make it a lot easier:

    
    
    import yagmail
    yag = yagmail.Connect('user@gmail.com', 'password')
    yagmail.send(email_to, subject = 'site down!', contents = 'with some error')
    

It has a lot more features, for example how to make it easier to send
attachments etc.

yagmail can be found at [github](https://github.com/kootenpv/yagmail).

You will probably have to install it first using pip:

    
    
    pip install yagmail  # python 2
    pip3 install yagmail # python 3 
    

