Send email with Office365 python library `python-o365`
<p>Ok So ive been able to send mail and read mail but I am now trying to attach an attachment to the mail and it doesnt seem to append the document as expected. I dont get any errors but I also dont get the mail if I attempt to add the attachment.</p>

<p>The library im using is <a href="https://github.com/Narcolapser/python-o365" rel="nofollow">here</a></p>

<p>The returned value frome the function is <code>True</code> but an email never arrives if i remove the <code>m.attachments.append('/path/to/data.xls')</code> line the email arrives as expected (without an attachment of course).</p>

<p><strong>Code</strong> </p>

<pre><code>def sendAddresses(username, password):
    try:
        authenticiation = (username, password)
        m = Message(auth=authenticiation)
        m.attachments.append('/path/to/data.xls')
        m.setRecipients("email@address.com")
        m.setSubject("Test Subject")
        m.setBody("Test Email")
        m.sendMessage()
    except Exception, e:
        print e
        return False
    return True
</code></pre>