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.
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign upRelated Posts | Replies | Views | Activity | |
---|---|---|---|---|
|
2
Jul 24
|
608 | ||
|
1
May 24
|
1206 | ||
|
2
May 24
|
807 | ||
|
1
Apr 24
|
1387 | ||
|
1
Feb 24
|
450 |
Go to this link:
https://www.odoo.com/forum/help-1/question/incoming-outgoing-mail-configuration-44842