I fixed this for my installation. It seems that there is something broken possibly in /usr/lib/python2.7/dist-packages/openerp/addons/mail/mail_mail.py or /usr/lib/python2.7/dist-packages/openerp/addons/base/ir/ir_mail_server.py that doesn't allow getting the smtp_user variable.
I saw the following error in my log file (my email addresses and domain names have been edited to make them generic):
"MailDeliveryException: (u'Mail delivery failed', u'Mail delivery failed via SMTP server \'mail.mydomain.com\'.\nSMTPRecipientsRefused: {\'myname@mydomain.com\': (550, \'Verification failed for <postmaster-odoo@mydomain.com>\\nNo Such User Here"\\nSender verify failed\')}')"
If it doesn't get the smtp_user and if the variable for mail.catchall.alias is not set (as noted in line 372 of /usr/lib/python2.7/dist-packages/openerp/addons/base/ir/ir_mail_server.py), it will put in "postmaster-odoo" as the user in the from address, i.e, postmaster-odoo@mydomain.com.
So, for a work-around, I just edited /usr/lib/python2.7/dist-packages/openerp/addons/base/ir/ir_mail_server.py line 379 and changed "postmaster-odoo" to "admin", since my SMTP user mail account is admin@mydomain.com. For your case, just change it to whatever the user part of the email address is. It will get the domain correctly put in there.
So, change this:
get_param = self.pool['ir.config_parameter'].get_param
postmaster = get_param(cr, SUPERUSER_ID, 'mail.catchall.alias',
default='postmaster-odoo',
context=context,)
domain = get_param(cr, SUPERUSER_ID, 'mail.catchall.domain', context=context)
if postmaster and domain:
return '%s@%s' % (postmaster, domain)
to this:
get_param = self.pool['ir.config_parameter'].get_param
postmaster = get_param(cr, SUPERUSER_ID, 'mail.catchall.alias',
default='admin',
context=context,)
domain = get_param(cr, SUPERUSER_ID, 'mail.catchall.domain', context=context)
if postmaster and domain:
return '%s@%s' % (postmaster, domain)
I hope this solves it for someone.
@ Jessie Goto Settings--> General Settings --> Configure the Outgoing Email Server --> create new--> Description: Gmail, smtp server: smtp.gmail.com, Smtp port: 465, Debugging marked, connection security: SSL/TLS, Gmail username, password, now click Test connection, result is Connection test succeeded! Everything seems properly set up! . check it.
I have done this all, but still not able to go ahead, please suggest something else. I am able to see all the sent mail details in LOGS.