コンテンツへスキップ
Odoo メニュー
  • サインイン
  • 無料で15日試す
  • アプリ
    財務
    • 会計
    • 請求
    • 経費
    • スプレッドシート(BI)
    • ドキュメント管理
    • 署名
    販売
    • CRM
    • 販売
    • POS店舗
    • POSレストラン
    • サブスクリプション
    • レンタル
    ウェブサイト
    • ウェブサイトビルダー
    • eコマース
    • ブログ
    • フォーラム
    • ライブチャット
    • eラーニング
    サプライチェーン
    • 在庫
    • 製造
    • 製品ライフサイクル管理 (PLM)
    • 購買
    • 整備
    • 品質
    人事業務
    • 従業員管理
    • 採用
    • 休暇管理
    • 人事評価
    • リファラル
    • フリート
    マーケティング
    • ソーシャルマーケティング
    • メールマーケティング
    • SMSマーケティング
    • イベント
    • マーケティングオートメーション
    • アンケート調査
    サービス
    • プロジェクト管理
    • タイムシート
    • フィールドサービス
    • ヘルプデスク
    • 計画
    • アポイントメント
    生産性向上ツール
    • ディスカッション
    • 承認
    • IoT
    • VoIP
    • ナレッジ
    • WhatsApp
    サードパーティアプリ Odooスタジオ Odooクラウドプラットホーム
  • インダストリー(業種別ソリューション)
    小売
    • 書店
    • アパレルショップ
    • 家具専門店
    • 食料品店
    • 金物店
    • 玩具店
    飲食・ホスピタリティ業界
    • バー・パブ
    • レストラン
    • ファストフード
    • ゲストハウス
    • 飲料販売代理店
    • ホテル
    不動産
    • 不動産会社
    • 建築事務所
    • 建設
    • 不動産管理
    • 造園
    • 住宅所有者組合
    コンサルティング
    • 会計事務所
    • Odooパートナー
    • マーケティングエージェンシー
    • 法律事務所
    • 人材派遣
    • 監査・認証
    製造
    • テキスタイル
    • 金属
    • 家具
    • 飲食
    • 醸造所
    • コーポレートギフト
    ヘルス & フィットネス
    • スポーツクラブ
    • 眼鏡店
    • フィットネスセンター
    • ウェルネス専門家
    • 薬局
    • ヘアサロン
    業種
    • 便利屋
    • IT ハードウェア・サポート
    • 太陽エネルギーシステム
    • 靴メーカー
    • クリーニングサービス
    • 空調設備サービス
    その他
    • 非営利団体
    • 環境機関
    • ビルボードレンタル
    • 写真
    • 自転車リース
    • ソフトウェアリセラー
    すべての業種を見る
  • コミュニティ
    学ぶ
    • チュートリアル
    • ドキュメンテーション
    • 認定
    • トレーニング
    • ブログ
    • ポッドキャスト
    教育サポート
    • 教育プログラム
    • Scale Up! ビジネスゲーム
    • Odooオフィス訪問
    ソフトを入手
    • ダウンロード
    • エディションを比較
    • リリース
    コラボレーション
    • Github
    • フォーラム
    • イベント
    • 翻訳
    • パートナーになる
    • パートナー様向けサービス
    • 会計事務所を登録
    サービス利用
    • パートナー一覧
    • 会計事務所一覧
    • 今すぐ相談する
    • 導入支援サービス
    • お客様一覧
    • サポート
    • アップグレード
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    製品デモを利用する
  • 料金
  • ヘルプ

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • CRM
  • e-Commerce
  • 会計
  • 在庫
  • PoS
  • プロジェクト
  • MRP
All apps
コミュニティで交流するには登録する必要があります。
全てのポスト 人々 バッジ
タグ (全て表示)
odoo accounting v14 pos v15
このフォーラムについて
コミュニティで交流するには登録する必要があります。
全てのポスト 人々 バッジ
タグ (全て表示)
odoo accounting v14 pos v15
このフォーラムについて
ヘルプ

Correct way to use multiple outgoing mailservers for multiple users?

購読

この投稿に活動があった際に通知を受け取ります

この質問にフラグが付けられました
mailmailserverodoo8.0
1 返信
12991 ビュー
アバター
Yenthe Van Ginneken (Mainframe Monkey)

Hi guys,

Every now and then I play around with the mail module and the features but I seem to run stuck on one point, everytime.
Imagine that you have three users: UserA, UserB and UserC.
Its perfectly possible to configure an incoming mail server for every user (so three incoming mail servers) however when you want to create three outgoing mail servers the problems start.
You can create three different outgoing mailservers but the one with the highest priority will always be used, no matter what.

My question is, what is the correct way to create multiple outgoing mail servers and use all of them depending on the user that is sending an email? An example:

UserA wants to send a message to a customer which he has just created under 'Sales' > 'Contacts'. He types a messages and submits this. It will now be e-mailed with the outgoing mailserver with the lowest priority, lets assume this is OutgoingmailserverUserA.
When UserB now wants to send an email out to the same customer but from another e-mail (OutgoingmailserverUserB) it will be sent with the mailserver from OutgoingmailserverUserA, since this has the lowest priority.

How can I create multiple outgoing mailservers and send an e-mail out depending on the user? This feature does not seem to exist out of the box and the only option seems to be to have one outgoing mailserver for all users?..

Thanks,
Yenthe

2
アバター
破棄
Futurelens

Use multiple outgoing mail servers for multiple users you can use this module: https://apps.odoo.com/apps/modules/14.0/fl_outgoing_mail_server_user/

アバター
Emipro Technologies Pvt. Ltd.
最善の回答

Yenthe,

I have asked same question before few days :

https://www.odoo.com/forum/help-1/question/how-to-send-email-by-userwise-modelwise-using-differnent-outgoing-servers-87768

I made a module for this and added a many2one field in outgoing server ( ir.mail_server model ) At the time of send mail, i checked if there is no default mail_server_id available then system will get the related mail server from "uid".

For example, see following method. ( Please give attention to bold lines )

class ir_mail_server(osv.osv):
    _inherit = "ir.mail_server"
    _columns = {
                'user_id_ept':fields.many2one('res.users','User',help='When user is assigned then \
                                    at the time of email sending from Odoo if no outgoing server found then \
                                    system will take the server which is assigned to this user.') 
                }
    
    def send_email(self, cr, uid, message, mail_server_id=None, smtp_server=None, smtp_port=None,
                   smtp_user=None, smtp_password=None, smtp_encryption=None, smtp_debug=False,
                   context=None):
        mail_server = mail_server_id
        if not mail_server :
            user_obj = self.pool.get('res.users').browse(cr,uid,uid)
            email = user_obj.partner_id and user_obj.partner_id.email or False
            if email :
                mail_server_ids = self.search(cr, SUPERUSER_ID, [('user_id_ept','=',uid)], order='sequence', limit=1)
                if mail_server_ids :
                    mail_server = mail_server_ids[0]
        return super(ir_mail_server,self).send_email(cr, uid, message,
                                                    mail_server_id=mail_server,
                                                    context=context)  


In a nutshell, before Odoo checks low priority outgoing server in case of if there is no mail server specified, I added condition to check outgoing server related to user configured on it with "uid". ( this sentence may be hard to understand ;) )

From my thinking this is the only way. However in my question i raised another interesting point. If you have a time please read it as well.

Latest Update : This module is out to Odoo store now. It is a Free App. You can download from this link. 

3
アバター
破棄
Yenthe Van Ginneken (Mainframe Monkey)
著作者

Hi Emipro, thanks a lot for your reply! I was thinking about doing exactly the same and I see that as the only option too. Is your module available anywhere on Github or something? It would be a waste if I would have to program the entire thing again while you've made this. Perhaps this is something you could put online on apps? I honestly think this would be great. I'll upvote this for now but I'll leave the accepting open for other responses too. :)

Emipro Technologies Pvt. Ltd.

Yenthe, that module is already available at myside but with more specific features. Tonight I will make it separate and post in Odoo Apps for free to download. Also I will inform you to your email so you can download it. Give me your email. (y)

Yenthe Van Ginneken (Mainframe Monkey)
著作者

Great Emipro! You can always drop me an e-mail at yenthe.vanginneken@vanroey.be , also to talk about other things regarding Odoo. Looking forward to your module, thanks!

Emipro Technologies Pvt. Ltd.

Yenthe, I sent you module on your specified email address. Enjoy !

Ricardo Gross

Could you please update the app link?

ディスカッションを楽しんでいますか?読むだけでなく、参加しましょう!

今すぐアカウントを作成して、限定機能を利用したり、素晴らしいコミュニティと交流しましょう!

登録
関連投稿 返信 ビュー 活動
Hostinger Mail - Odoo
mail mailserver
アバター
0
5月 24
2991
Critical Problem: Odoo 14 auto responder loop to mails from unknown sender
mail mailserver
アバター
0
3月 21
3630
Odoo 8 mail problems: Admin receives all messages / notification of new mails not working
mail odoo8.0
アバター
0
7月 16
4030
Automatic record creation fails on incoming mails
mail mailserver
アバター
0
3月 16
4217
where can I find openerp_mailgate.py on v8? 解決済
mail mailserver
アバター
アバター
アバター
2
8月 15
6441
コミュニティ
  • チュートリアル
  • ドキュメンテーション
  • フォーラム
オープンソース
  • ダウンロード
  • Github
  • Runbot
  • 翻訳
サービス
  • Odoo.shホスティング
  • サポート
  • アップグレード
  • カスタム開発
  • 教育プログラム
  • 会計事務所一覧
  • パートナー一覧
  • パートナーになる
企業情報
  • 会社概要
  • ブランドアセット
  • お問い合わせ
  • 採用情報
  • イベント
  • ポッドキャスト
  • ブログ
  • お客様一覧
  • リーガル情報 • プライバシーポリシー
  • セキュリティ
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk slovenščina Español (América Latina) Español ภาษาไทย Türkçe українська Tiếng Việt

Odoo(オドゥー)は、CRM、eコマース、会計、在庫管理、POS、プロジェクト管理など、企業のさまざまな業務を一つのシステムで管理できる、ベルギー発のオープンソースのERPソフトウェアです。

高機能で使いやすく、完全に統合されたERPとして、ユニークな価値を提供しています。

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now