Skip to Content
Odoo Menu
  • Prihlásiť sa
  • Vyskúšajte zadarmo
  • Aplikácie
    Financie
    • Účtovníctvo
    • Fakturácia
    • Výdavky
    • Tabuľka (BI)
    • Dokumenty
    • Podpis
    Predaj
    • CRM
    • Predaj
    • POS Shop
    • POS Restaurant
    • Manažment odberu
    • Požičovňa
    Webstránky
    • Tvorca webstránok
    • eShop
    • Blog
    • Fórum
    • Živý chat
    • eLearning
    Supply Chain
    • Sklad
    • Výroba
    • Správa životného cyklu produktu
    • Nákup
    • Údržba
    • Manažment kvality
    Ľudské zdroje
    • Zamestnanci
    • Nábor zamestnancov
    • Voľné dni
    • Hodnotenia
    • Odporúčania
    • Vozový park
    Marketing
    • Marketing sociálnych sietí
    • Email marketing
    • SMS marketing
    • Eventy
    • Marketingová automatizácia
    • Prieskumy
    Služby
    • Projektové riadenie
    • Pracovné výkazy
    • Práca v teréne
    • Helpdesk
    • Plánovanie
    • Schôdzky
    Produktivita
    • Tímová komunikácia
    • Schvalovania
    • IoT
    • VoIP
    • Znalosti
    • WhatsApp
    Third party apps Odoo Studio Odoo Cloud Platform
  • Industries
    Retail
    • Book Store
    • Clothing Store
    • Furniture Store
    • Grocery Store
    • Hardware Store
    • Toy Store
    Food & Hospitality
    • Bar and Pub
    • Restaurant
    • Fast Food
    • Guest House
    • Beverage distributor
    • Hotel
    Real Estate
    • Real Estate Agency
    • Architecture Firm
    • Construction
    • Estate Managament
    • Gardening
    • Property Owner Association
    Consulting
    • Accounting Firm
    • Odoo Partner
    • Marketing Agency
    • Law firm
    • Talent Acquisition
    • Audit & Certification
    Výroba
    • Textile
    • Metal
    • Furnitures
    • Food
    • Brewery
    • Corporate Gifts
    Health & Fitness
    • Sports Club
    • Eyewear Store
    • Fitness Center
    • Wellness Practitioners
    • Pharmacy
    • Hair Salon
    Trades
    • Handyman
    • IT Hardware and Support
    • Solar Energy Systems
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Others
    • Nonprofit Organization
    • Environmental Agency
    • Billboard Rental
    • Photography
    • Bike Leasing
    • Software Reseller
    Browse all Industries
  • Komunita
    Vzdelávanie
    • Tutoriály
    • Dokumentácia
    • Certifikácie
    • Školenie
    • Blog
    • Podcast
    Empower Education
    • Vzdelávací program
    • Scale Up! Business Game
    • Visit Odoo
    Softvér
    • Stiahnuť
    • Porovnanie Community a Enterprise vierzie
    • Releases
    Spolupráca
    • Github
    • Fórum
    • Eventy
    • Preklady
    • Staň sa partnerom
    • Services for Partners
    • Register your Accounting Firm
    Služby
    • Nájdite partnera
    • Nájdite účtovníka
    • Meet an advisor
    • Implementation Services
    • Zákaznícke referencie
    • Podpora
    • Upgrades
    ​Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Získajte demo
  • Cenník
  • Help

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

  • CRM
  • e-Commerce
  • Účtovníctvo
  • Sklady
  • PoS
  • Projektové riadenie
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Tagy (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Tagy (View all)
odoo accounting v14 pos v15
About this forum
Pomoc

Zoho.com: Connection unexpectedly closed

Odoberať

Get notified when there's activity on this post

This question has been flagged
emailsmtpzoho
5 Replies
38910 Zobrazenia
Avatar
Arnaldo Ortega

I'm trying to configure access to a catch-all mail hosted by Zoho.com with my own domain. Everything worked fine before, with a Gmail address (not my domain, just a regular Gmail account) but with Zoho I can't send emails.

1) Incoming is configured for IMAP and working flawlessly.

2) Outgoing is configured as follows:

Description: Zoho (catch-all)

Priority: 10

SMTP Server: smtp.zoho.com

SMTP Port: 465

Debugging: [not flagged]

Connection Security: SSL/TLS

Username: <my_catch_all_email@mydomain.com)< p="">

Password: <password>

The [Test Connection] works but when sending emails from any application I get the infamous message "SMTPServerDisconnected: Connection unexpectedly closed". I already tried to set Alias Domain to 'localhost' and '127.0.0.1' with the same results. Couldn't find much help on the net so I'm posting here...

Thanks in advance for any help!

2
Avatar
Zrušiť
Avatar
Keypress
Best Answer

Hello Guys

here is the module to fix the issue

https://apps.odoo.com/apps/modules/13.0/zoho_mail_fix_spt/

Demo: https://youtu.be/XFofqLoa4ic

0
Avatar
Zrušiť
Avatar
Kai Chang
Best Answer

I also have same problem.

After one day of investigation, I found the problem is because Zoho only allow you send email from SMTP_USER.

So my fix is change code in /opt/odoo/odoo-server/openerp/addons/base/ir/ir_mail_server.py

You need to change "smtp_from" to "smtp_user" and also replace message['from'] to smtp_user

            try:
                smtp = self.connect(smtp_server, smtp_port, smtp_user, smtp_password, smtp_encryption or False, smtp_debug)
                #smtp.sendmail(smtp_from, smtp_to_list, message.as_string())

                #AIO FIXX 20150308 : Because of Zoho mail does not allow relay mail
                #That means the mail must sent from smtp_user
                #so we replace smtp_from => smtp_user
                #Also need to replace message['From'] to smtp_user
                #Here we only replace email address part but keep email name
                #example: AIO Robotics Inc. <old@email.com> to AIO Robotics Inc. <smtp_user email>
                from email.utils import parseaddr,formataddr
                (oldname,oldemail) = parseaddr(message['From']) #exact name and address
                newfrom = formataddr((oldname,smtp_user)) #use original name with new address
                message.replace_header('From', newfrom) #need to use replace_header instead '=' to prevent double field
                smtp.sendmail(smtp_user, smtp_to_list, message.as_string())
            finally:
                if smtp is not None:
                    smtp.quit()

2
Avatar
Zrušiť
Hengky Zhang

i still cannot send email can you asist me

Jornald

Can you share your code or some logic? I still cannot send

Avatar
Marcio Marins
Best Answer

 Thanks guys!

I use Zoho Mail server as well. In my case, I used the solution of Kai Chang inside of an addon that I built and added the user of the session to the field 'Reply To', right after replacing the header. So then, even the sender being a specific e-mail (like webmaster@domain.com), whenever the receiver reply it, the user who sent the e-mail can receive the response.


message.replace_header('Reply-To', oldemail)    # change the 'Reply To' with the current user

1
Avatar
Zrušiť
Jornald

Can you share your code or some logic? I still cannot send

Avatar
Mohamad Osama
Best Answer

Thanks for Mr. "Kai Chang" and "Marcio Marins"
I used to have the same problem in Odoo v15, but with some help I did the following:

  • I go to file "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_mail_server.py"
  • Find method `_prepare_email_message`
  • Add some lines just before it's return ' #return smtp_user, smtp_to_list, message '
  • Code:

from email.utils import parseaddr,formataddr
_logger.info('Loooooog smtp_from was ' + smtp_from)
smtp_user = getattr(smtp_session, 'user', False)            #get the user address from smtp
(oldname,oldemail) = parseaddr(message['From'])         #exact name and address
newfrom = formataddr((oldname,smtp_user))                 #use original name with new address
message.replace_header('From', newfrom)                      #use replace_header instead '=' to prevent double field
_logger.info('Loooooog message[From] become ' + message['From'])
return smtp_user, smtp_to_list, message

just save and restart the service.





0
Avatar
Zrušiť
Avatar
Ab Bot
Best Answer

OMG Thank you Marcio Marins!

Odoo Version 15.0 (community edition)

ok To get Zoho with custom domains to work in odoo (no-reply@exemple.com)

Step

1. Make sure you at least have the trial or a paid version since the free version doesn't allow you to connect to anything other then their webpage (mail.zoho.com)

2. Make sure you have developer mode (makes things easier)

3. clic on Users & Compagnies (its on the top middle/left of your screen) and choose company

4. select the compagny (default is "My Company")

5. Clic on edit

6. Replace the email you have with the one you're trying to use (ex: 123@gmail.com and replace it with 123@mydomain.com) make sure it's the same one you added to "outgoing Mail Server".

Voila!

0
Avatar
Zrušiť
Enjoying the discussion? Don't just read, join in!

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

Registrácia
Related Posts Replies Zobrazenia Aktivita
sending email error
email smtp zoho
Avatar
Avatar
Avatar
2
sep 19
7746
Zoho mail: Connection unexpectedly closed
email smtp zoho
Avatar
Avatar
1
mar 15
8289
outgoing mail server not working with smtp.office365.com Solved
email smtp
Avatar
Avatar
Avatar
Avatar
Avatar
14
máj 24
237164
Error sending email
email smtp
Avatar
Avatar
Avatar
2
mar 23
6871
When i request a password reminder, i don't get any email
email smtp
Avatar
Avatar
1
máj 22
3644
Komunita
  • Tutoriály
  • Dokumentácia
  • Fórum
Open Source
  • Stiahnuť
  • Github
  • Runbot
  • Preklady
Služby
  • Odoo.sh hosting
  • Podpora
  • Vyššia verzia
  • Custom Developments
  • Vzdelávanie
  • Nájdite účtovníka
  • Nájdite partnera
  • Staň sa partnerom
O nás
  • Naša spoločnosť
  • Majetok značky
  • Kontaktujte nás
  • Pracovné ponuky
  • Eventy
  • Podcast
  • Blog
  • Zákazníci
  • Právne dokumenty • Súkromie
  • Bezpečnosť
الْعَرَبيّة 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 je sada podnikových aplikácií s otvoreným zdrojovým kódom, ktoré pokrývajú všetky potreby vašej spoločnosti: CRM, e-shop, účtovníctvo, skladové hospodárstvo, miesto predaja, projektový manažment atď.

Odoo prináša vysokú pridanú hodnotu v jednoduchom použití a súčasne plne integrovanými biznis aplikáciami.

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