How can i send 'cc' email using smtpclient module?

Asked by Deven Moga

Hello,

Using smtpclient module, how can i send 'cc' copy of an email to the particular receipient?

Waiting for the reply,

Thanks,
Deven

Question information

Language:
English Edit question
Status:
Solved
For:
Odoo Addons (MOVED TO GITHUB) Edit question
Assignee:
No assignee Edit question
Solved by:
Jay Vora (Serpent Consulting Services)
Solved:
Last query:
Last reply:

This question was reopened

Revision history for this message
Jay Vora (Serpent Consulting Services) (jayvora) said :
#1

Hello Deven,

If you are using the module from trunk-extra-addons branch, you can add headers to the smtpclient configuration.
Headers appear as the tab of 'Message headers '.

Thanks.

Revision history for this message
Deven Moga (erpsupport) said :
#2

Hello Jay,

I have done the process as per your suggestion, but its not working. Can you please provide me any other option?
Waiting for your reply.

Sincerely,
Deven

Revision history for this message
Jay Vora (Serpent Consulting Services) (jayvora) said :
#3

Hello Deven,
This is the normal option someone would follow.
If you want specific field, you may add a field CC to your smtpclient object and get it working accordingly.

Thanks.

Revision history for this message
Deven Moga (erpsupport) said :
#4

Hello Jay,

But that option is not working. When i see contents in Message tab of 'Message Queue' screen then that header is not displaying. What should i do now?

Sincerely,
Deven

Revision history for this message
Jay Vora (Serpent Consulting Services) (jayvora) said :
#5

Hello,

Headers appear as the tab of 'Message headers '.

Get the module from trunk-extra-addons branch.

Thanks.

Revision history for this message
Deven Moga (erpsupport) said :
#6

Hello,

I have already taken smtp module from trunk-extra-addons and in that in 'Message headers' tab, i have put the values as :

Header = cc
Value = my email address

But when i send any email from openerp, that above header is not coming. Because of that i can not send cc copy of an email to third person. How can i do that now?

Sincerely,
Deven

Revision history for this message
Jay Vora (Serpent Consulting Services) (jayvora) said :
#7

Hello Deven,
Let me try to check whether it really is a problem or not.

I will be back to you soon.

Thanks.

Revision history for this message
Deven Moga (erpsupport) said :
#8

Ok Jay,

I am waiting..

Sincerely,
Deven

Revision history for this message
Jay Vora (Serpent Consulting Services) (jayvora) said :
#9

Hello Deven,

We have made it easier now for the users and now the SMTPclient has separate CC BCC fields.

The module now appears in trunk version with latest code.

You may download it from https://code.launchpad.net/~openerp/openobject-addons/trunk.

We appreciate your inputs and intrerest.

Thanks.

Revision history for this message
Jay Vora (Serpent Consulting Services) (jayvora) said :
#10

Would you please close this thread if its solved?
Thanks.

Revision history for this message
Deven Moga (erpsupport) said :
#11

Thanks Jay (Open ERP), that solved my question.

Revision history for this message
Deven Moga (erpsupport) said :
#12

Hello Jay,

That module contains error. Its not working perfectly.

Sincerely,
Deven

Revision history for this message
Jay Vora (Serpent Consulting Services) (jayvora) said :
#13

Hello,

Without knowing the traceback, how can someone point you for solution? You could have attached a traceback or steps to generate the error.

If it contains any error,post it to a bug section. This is not the right place.

Trunk team will look on this.

Thanks.

Revision history for this message
Deven Moga (erpsupport) said :
#14

Hello Jay,

Below are the errors appearing in smtp module.

-----------------------------
In smtpclient module when i click on "Set to draft" button then at that time below error is generating :

Traceback (most recent call last):
  File "/home/deven/workspace/server/bin/netsvc.py", line 244, in dispatch
    result = LocalService(service_name)(method, *params)
  File "/home/deven/workspace/server/bin/netsvc.py", line 73, in __call__
    return getattr(self, method)(*params)
  File "/home/deven/workspace/server/bin/service/web_services.py", line 576, in execute
    res = service.execute(db, uid, object, method, *args)
  File "/home/deven/workspace/server/bin/osv/osv.py", line 58, in wrapper
    return f(self, dbname, *args, **kwargs)
  File "/home/deven/workspace/server/bin/osv/osv.py", line 119, in execute
    res = pool.execute_cr(cr, uid, obj, method, *args, **kw)
  File "/home/deven/workspace/server/bin/osv/osv.py", line 111, in execute_cr
    return getattr(object, method)(cr, uid, *args, **kw)
  File "/home/deven/workspace/server/bin/addons/smtpclient/smtpclient.py", line 550, in set_to_draft
    self.stop_process(cr, uid, ids, context)
  File "/home/deven/workspace/server/bin/addons/smtpclient/smtpclient.py", line 587, in stop_process
    self.pool.get('ir.cron').write(cr, uid, [pid], {'active':False})
  File "/home/deven/workspace/server/bin/addons/base/ir/ir_cron.py", line 147, in write
    res = super(ir_cron, self).write(cr, user, ids, vals, context=context)
  File "/home/deven/workspace/server/bin/osv/orm.py", line 2607, in write
    cr.execute('SELECT id FROM "'+self._table+'" WHERE id IN ('+ids_str+')')
  File "/home/deven/workspace/server/bin/sql_db.py", line 77, in wrapper
    return f(self, *args, **kwargs)
  File "/home/deven/workspace/server/bin/sql_db.py", line 122, in execute
    res = self._obj.execute(query, params)
ProgrammingError: operator does not exist: integer = boolean
LINE 1: SELECT id FROM "ir_cron" WHERE id IN (False)
                                          ^
HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts.
--------------------

-----------------
Varification code sending email is not working. When i send that email in Message queue it showing "Error" status and below is error log:

(530, '5.5.1 Authentication Required. Learn more at\n5.5.1 http://mail.google.com/support/bin/answer.py?answer=14257 22sm4774076iwn.0', u'erpsupport@4colordesign.com')

Earlier its used to work from the same email account.
----------------

----------------
Earlier when cron job are sending email then at that time in server log it was showing 'smtp', but now it is showing 'imap' as shown below,

[2010-04-28 15:42:13,994] WARNING:imap:
[2010-04-28 15:43:21,087] WARNING:imap:
[2010-04-28 15:44:30,022] WARNING:imap:
[2010-04-28 15:45:14,725] WARNING:imap:

---------

Waiting for your reply,

Sincerely,
Deven

Revision history for this message
Deven Moga (erpsupport) said :
#15

Hello Jay,

As per your suggestion, I have posted above error in bug section of openerp-addons-trunk

Sincerely,
Deven

Revision history for this message
Best Jay Vora (Serpent Consulting Services) (jayvora) said :
#16

Thanks Deven.

We appreciate your approach.

Kindly close this thread.

Revision history for this message
Deven Moga (erpsupport) said :
#17

Thanks Jay (Open ERP), that solved my question.