简体   繁体   English

如何在Odoo 9中通过Outlook Office365设置传出邮件服务器

[英]How to setup outgoing mail server through outlook office365 in odoo 9

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 . 我将尝试在odoo 9中设置传出邮件服务器。因此,我填写了所有字段并测试了连接,连接也成功了,但是在发送邮件时,它将生成一个错误。

Field fill like that:- 像这样的字段填充:

Name : sendmail 名称:sendmail

Priority: 10 优先级:10

SMTP Server : smtp.office365.com SMTP服务器:smtp.office365.com

SMTP Port:25 SMTP端口:25

Debugging: enable 调试:启用

Connection Security:TLS (STARTTLS) 连接安全性:TLS(STARTTLS)

Username:my yser name 用户名:我的名字

Password:password 密码:password

But, when we send any mail then it will generate the below error 但是,当我们发送任何邮件时,它将生成以下错误

  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")

So i tried too much for this , but i am not getting any solution , if you have any solutin , please share with me . 所以我为此付出了太多的努力,但是我没有得到任何解决的办法,如果您有任何解决的办法,请与我分享。

Use port 587. 使用端口587。

The error message tells you that the sender is invalid - you can only send as the mailbox owner (primary SMTP address) or as one of the proxy addresses associated with the mailbox. 该错误消息告诉您发件人无效-您只能以邮箱所有者(主SMTP地址)或与邮箱关联的代理地址之一进行发送。

删除“设置”->“技术”->“参数”->“系统参数”下的所有catchall参数(mail.catchall.domain和mail.catchall.alias),它的工作方式类似于charm。

WORKS LIKE CHARM : 类似于CHARM的作品:

Removing all catchall parameters (mail.catchall.domain and mail.catchall.alias) under "Settings" -> "Technical" -> "Parameters" -> "System Parameters" and it work like charm . 删除“设置”->“技术”->“参数”->“系统参数”下的所有catchall参数(mail.catchall.domain和mail.catchall.alias),它的工作方式类似于charm。 TY Debasish TY Debasish

I'm on Odoo V12 我正在使用Odoo V12

It was not suffisient for my problem, I had to delete the alias domain but there another thing to check : 对于我的问题,这还不够,我不得不删除别名域,但是还有另一件事要检查:

I initialy created my odoo installation with a GMAIL address, worked a bit but had to switch for a pro e-mail because all my invitations e-mail was blocked by Google Bot beacause it look liked suspicious. 最初,我使用GMAIL地址创建了odoo安装,可以工作一些,但是不得不切换为专业电子邮件,因为我的所有邀请电子邮件都被Google Bot阻止了,因为它看起来像是可疑的。 It did this only in Odoo v12 because there is more links in the mail. 它仅在Odoo v12中这样做,因为邮件中有更多链接。

So I configured my real smtp server in Odoo but get the error 550. Odoo kept in the COMPANY settings the primary gmail address and tried to send on my other smtp server with the gmail name. 因此,我在Odoo中配置了真正的smtp服务器,但收到错误550。Odoo在COMPANY设置中保留了主要的gmail地址,并尝试使用gmail名称在我的其他smtp服务器上发送。 The other server didn't accepted it so sent me back error 550. 另一台服务器不接受它,因此向我发送了错误550。

Once i putted my new e-mail address in the company description, and deleted alias domain it worked !! 一旦我在公司描述中放入了新的电子邮件地址,并删除了别名域,它就可以正常工作!

PS : Don't try to edit ir_mail_server.py to put in bruteforce your e-mail ... Doesn't work .. PS:请勿尝试编辑ir_mail_server.py以强行输入您的电子邮件...不起作用..

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM