title: How to setup outgoing mail server through outlook office365 in odoo 9
body: <p>I will try to setup outgoing mail server in odoo 9 .so i fill all the field and test connection and the connection also success , but at the time of send mail it will generate an error .</p>
  
  <p>Field fill like that:-</p>
  
  <p>Name : sendmail</p>
  
  <p>Priority: 10</p>
  
  <p>SMTP Server : smtp.office365.com</p>
  
  <p>SMTP Port:25 </p>
  
  <p>Debugging: enable</p>
  
  <p>Connection Security:TLS (STARTTLS)</p>
  
  <p>Username:my yser name</p>
  
  <p>Password:password</p>
  
  <p>But, when we send any mail then it will generate the below error</p>
  
  <pre><code>  16-12-06 10:04:28,440 426 INFO test openerp.addons.base.ir.ir_mail_server: Mail delivery failed via SMTP server 'smtp.office365.com'.
   SMTPDataError: 550
   5.7.60 SMTP; Client does not have permissions to send as this sender
   2016-12-06 10:04:28,443 426 ERROR test  openerp.addons.mail.models.mail_mail: failed sending mail (id: 136) due to             Mail Delivery Failed
   Mail delivery failed via SMTP server 'smtp.office365.com'.
   SMTPDataError: 550
   5.7.60 SMTP; Client does not have permissions to send as this sender
   Traceback (most recent call last):
   File "/usr/lib/python2.7/dist-     packages/openerp/addons/mail/models/mail_mail.py", line 262, in send
   res = IrMailServer.send_email(msg,  mail_server_id=mail.mail_server_id.id)
   File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 248, in wrapper
   return new_api(self, *args, **kwargs)
   File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 490, in new_api
   result = method(self._model, cr, uid, *args, **old_kwargs)
   File "/usr/lib/python2.7/dist-packages/openerp/addons/base/ir/ir_mail_server.py", line 483, in send_email
   raise MailDeliveryException(_("Mail Delivery Failed"), msg)
   MailDeliveryException: (u'Mail Delivery Failed', u"Mail delivery failed via SMTP server 'smtp.office365.com'.\nSMTPDataError: 550\n5.7.60 SMTP; Client does not have permissions to send as this sender")
  </code></pre>
  
  <p>So i tried too much for this , but i am not getting any solution , if you have any solutin , please share with me .</p>