This question has been flagged
2 Replies
9078 Views

hello, I have configured smtp account for each user of my company how can i use this different smtp to send the mail?(i.e. if demo user login and want to send mail then it will use smtp account for demo user)

Avatar
Discard
Best Answer

I create small module for using different smtp settings for different users: github.com/bamps/smtp-per-user. Try it.

Avatar
Discard

It would be easier for a lot of users if your module showed in the OpenERP module installation interface. Easier to install and also keep up to date with any future bug fixes. Is this possible for you? Are you planning on doing it soon? I'm curious as to what it takes for a programmer to have his work show up in the OpenERP interface. Anyway, thank you for your good work.

Hi Gilles! Glad to see your interest! It is not possible to add module to http://apps.openerp.com now. Here comments: http://help.openerp.com/question/18074/how-to-add-my-module-on-appsopenerpcomapps/ . Of course I'm interested to use standart OpenERP way for distributing it.

I've downloaded the files from github and placed them in the addons folder. I updated the module list and then clicked "install" for the module. The module is now installed. I don't see any change to the OpenERP interface. Nothing under Settings > Technical > Email > Outgoing Mail Servers. Nothing in Settings > Users > Users > Username. Where in the menus can I enter smtp settings for each user?

1) Install module. 2)Create or edit outgoing mail server: you should see "Owner" field. Here you point user for this smtp server. 3)After setup you should add Read Access to ir.mail_server for relevant user groups via OpenERP interface: Database Structure -> Models -> ir.mail_server -> Access Rights.

Best Answer

You don't need to set up a different SMTP for each user. OpenERP uses aliases. That means, if you set a domain in Settings > General Settings > Alias Domain to your_alias_domain.com, OpenERP will generate an alias for every user. If Jone Doe sends an email, OpenERP will send the email as if originated from jonedoe@your_alias_domain.com.

You can find a list of all aliases available in the system from the menu Settings > Technical > Email > Aliases. Hope this helps.

Avatar
Discard

Anyway, how to setup user depending smtp? Mail service requires correct user authentification for outgoing emails: SMTPSenderRefused: (553, '5.7.1 Sender address rejected: not owned by auth user.'

Our company uses Gmail. When an employee sends an email (through a browser or email client) then that email shows up in his "sent" folder on gmail. When an employee sends a purchase order or quote through OpenERP then he wants that email to show up in his gmail "sent" folder. If he sends that email through the company-wide smtp login then it won't show up in the individual's "sent" folder. The answer using aliases is attractive by its simplicity but can it be made to work in regards to the "sent" folder? Otherwise, the smtp_per_user module (mentioned below) seems to be the only solution.