İçereği Atla
Odoo Menü
  • Portal
  • Ücretsiz deneyin
  • Uygulamalar
    Finans
    • Muhasebe
    • Faturalama
    • Masraf Yönetimi
    • Elektronik Çizelge (BI)
    • Belgeler
    • İmza
    Satış
    • Müşteri İlişkileri Yönetimi (CRM)
    • Satış
    • Satış Noktası Mağaza
    • Satış Noktası Restoran
    • Abonelikler
    • Kiralama
    Web Sitesi
    • Web Sitesi Oluşturucu
    • eTicaret
    • Blog
    • Forum
    • Canlı Sohbet
    • eÖğrenme
    Tedarik Zinciri
    • Envanter
    • Üretim
    • Ürün Yaşam Döngüsü Yönetimi
    • Satın Alma
    • Bakım
    • Kalite
    İnsan Kaynakları
    • Çalışanlar
    • İşe Alım
    • İzin
    • Değerlendirme
    • Referans
    • Filo Yönetimi
    Pazarlama
    • Sosyal Medyada Pazarlama
    • E-posta ile Pazarlama
    • SMS ile Pazarlama
    • Etkinlikler
    • Pazarlama Otomasyonu
    • Anket
    Hizmetler
    • Proje Yönetimi
    • Çalışma Çizelgeleri
    • Saha Hizmeti
    • Yardım Masası
    • Planlama
    • Randevular
    Verimlilik
    • Sohbet
    • Onay
    • Nesnelerin İnterneti
    • VoIP
    • Bilgi Bankası
    • WhatsApp
    Üçüncü taraf uygulamalar Odoo Stüdyo Odoo Bulut Platformu
  • Sektörler
    Perakende satış
    • Kitapçı
    • Giyim Mağazası
    • Mobilya Mağazası
    • Gıda Marketi
    • Hırdavat Dükkanı
    • Oyuncak Dükkanı
    Gıda ve Konaklama
    • Bar ve Pub
    • Restoran
    • Fast Food Restoranı
    • Konuk Evi
    • İçecek Distribütörü
    • Otel
    Gayrimenkul
    • Emlak Acentesi
    • Mimarlık Firması
    • İnşaat
    • Emlak Yönetimi
    • Bahçe Tasarımı
    • Mülk Sahipleri Derneği
    Uzmanlık
    • Muhasebe Firması
    • Odoo Partner
    • Pazarlama Ajansı
    • Hukuk Firması
    • Yetenek Kazanımı
    • Denetim ve Belgelendirme
    Üretim
    • Tekstil
    • Metal
    • Mobilyalar
    • Gıda
    • Bira fabrikası
    • Kurumsal Hediye
    Sağlık ve Spor
    • Spor Kulübü
    • Optik Mağazası
    • Fitness Merkezi
    • Sağlıklı Yaşam Merkezi
    • Eczane
    • Kuaför Salonu
    Ticaret
    • Tamirci
    • BT Donanım & Destek
    • Güneş Enerjisi Sistemleri
    • Ayakkabı İmalatçısı
    • Temizlik Hizmetleri
    • HVAC Hizmetleri
    Diğerleri
    • Kar Amacı Gütmeyen Kuruluş
    • Çevre Ajansı
    • Reklam Panosu Kiralama
    • Fotoğrafçılık
    • Bisiklet Kiralama
    • Yazılım Bayisi
    Tüm Sektörlere Göz Atın
  • Topluluk
    Öğrenim
    • Eğitim Araçları
    • Dokümantasyon
    • Sertifikasyonlar
    • Eğitim Etkinlikleri
    • Blog
    • Podcast
    Eğitim ve Gelişim
    • Eğitim Programı
    • Scale Up! İşletme Oyunu
    • Odoo'yu Ziyaret Edin
    Yazılım
    • İndirin
    • Sürümleri Kıyaslayın
    • Sürümler
    İş Birliği
    • Github
    • Forum
    • Etkinlikler
    • Çeviriler
    • Partner Olun
    • Partnerler için Hizmetler
    • Muhasebe Firmanızı Kaydettirin
    Hizmetler
    • Partner Bulun
    • Muhasebeci Bulun
    • Bir danışmanla görüşün
    • Kurulum Hizmetleri
    • Müşteri Referansları
    • Destek
    • Sürüm Yükseltme
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Demo randevusu alın
  • Fiyatlandırma
  • Yardım

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

  • Müşteri İlişkileri Yönetimi
  • e-Commerce
  • Muhasebe
  • Envanter
  • PoS
  • Proje Yönetimi
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Etiketler (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Etiketler (View all)
odoo accounting v14 pos v15
About this forum
Yardım

Correct way to use multiple outgoing mailservers for multiple users?

Abone Ol

Get notified when there's activity on this post

Bu soru işaretlendi
mailmailserverodoo8.0
1 Cevapla
12997 Görünümler
Avatar
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
Avatar
Vazgeç
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/

Avatar
Emipro Technologies Pvt. Ltd.
En İyi Yanıt

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
Avatar
Vazgeç
Yenthe Van Ginneken (Mainframe Monkey)
Üretici

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)
Üretici

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?

Enjoying the discussion? Don't just read, join in!

Create an account today to enjoy exclusive features and engage with our awesome community!

Üye Ol
İlgili Gönderiler Cevaplar Görünümler Aktivite
Hostinger Mail - Odoo
mail mailserver
Avatar
0
May 24
2991
Critical Problem: Odoo 14 auto responder loop to mails from unknown sender
mail mailserver
Avatar
0
Mar 21
3634
Odoo 8 mail problems: Admin receives all messages / notification of new mails not working
mail odoo8.0
Avatar
0
Tem 16
4034
Automatic record creation fails on incoming mails
mail mailserver
Avatar
0
Mar 16
4221
where can I find openerp_mailgate.py on v8? Çözüldü
mail mailserver
Avatar
Avatar
Avatar
2
Ağu 15
6445
Topluluk
  • Eğitim Araçları
  • Dokümantasyon
  • Forum
Açık Kaynak
  • İndirin
  • Github
  • Runbot
  • Çeviriler
Hizmetler
  • Odoo.sh Hosting
  • Destek
  • Sürüm Yükseltme
  • Özel Geliştirmeler
  • Eğitim
  • Muhasebeci Bulun
  • Partner Bulun
  • Partner Olun
Hakkında
  • Şirketimiz
  • Pazarlama Gereçleri
  • İletişim
  • Kariyer
  • Etkinlikler
  • Podcast
  • Blog
  • Müşteriler
  • Hukuki • Gizlilik
  • Güvenlik
الْعَرَبيّة 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, müşteri ilişkileri yönetimi, eTicaret, muhasebe, envanter, satış noktası, proje yönetimi gibi şirketinizin tüm ihtiyaçlarını karşılayan bir açık kaynak işletme uygulamaları paketidir.

Odoo’nun eşsiz değer önermesi, aynı anda hem kullanımının çok kolay olup hem de tamamen entegre olmasıdır.

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