I want to send an email to "test@foxmail.com" from "sending@foxmail.com" in some situation;
shall I get some advice for this?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
I want to send an email to "test@foxmail.com" from "sending@foxmail.com" in some situation;
shall I get some advice for this?
add picture for outgoing configure as below:
print "test.............................."
x=tools.email_send(email_from='116599778@qq.com',
email_to=['85876243@qq.com'],
subject='Some subject just a test',
body='Some body', )
print x
print "tested....................................."
add codes as above, when I do it and get the result as below:
test..............................
False
tested.....................................
I think there is still some problems.
Hi, you may use 'message_post' of the 'mail.thread' model. E.g.:
self.message_post(
body='some body',
subject='some subject',
partner_ids=partner_ids, # put here [Id], where id - is the partner with email test@foxmail.com
email_from = "sending@foxmail.com", #it would be shown as 'from' address. Real address would be taken from an outgoing email server.
)
Another way is to send the email directly via the Odoo tools:
from openerp import tools tools.email_send(email_from='sending@foxmail.com', email_to=[test@foxmail.com], subject='Some subject', body='Some body',)
thanks for your reply, I have tried as blow:
tools.email_send(email_from='sending@foxmail.com',
email_to=['test@qq.com'],
subject='Some subject',
body='Some body', )
but I get error as below:
Traceback (most recent call last):
File "D:\programs\odoo10\odoo\tools\mail.py", line 460, in email_send
attachments, message_id, references, openobject_id, subtype, headers=headers)
TypeError: unbound method build_email() must be called with ir.mail_server instance as first argument (got str instance instead)
It seems that your outgoing email server is not configured
thanks for your reply again;
I have configured "outgoing email" as next reply on this post, but still failed;
more details are listed on the next post;
Maybe there is still some problems.
Tạo tài khoản ngay hôm nay để tận hưởng các tính năng độc đáo và tham gia cộng đồng tuyệt vời của chúng tôi!
Đăng ký| Bài viết liên quan | Trả lời | Lượt xem | Hoạt động | |
|---|---|---|---|---|
|
0
thg 11 25
|
408 | |||
|
0
thg 11 25
|
320 | |||
|
1
thg 7 25
|
2145 | |||
|
5
thg 11 25
|
20164 | |||
|
0
thg 4 25
|
1962 |
1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.
Go to this link:
https://www.odoo.com/forum/help-1/question/incoming-outgoing-mail-configuration-44842