Ir al contenido
Odoo Menú
  • Identificarse
  • Pruébalo gratis
  • Aplicaciones
    Finanzas
    • Contabilidad
    • Facturación
    • Gastos
    • Hoja de cálculo (BI)
    • Documentos
    • Firma electrónica
    Ventas
    • CRM
    • Ventas
    • TPV para tiendas
    • TPV para restaurantes
    • Suscripciones
    • Alquiler
    Sitios web
    • Creador de sitios web
    • Comercio electrónico
    • Blog
    • Foro
    • Chat en directo
    • eLearning
    Cadena de suministro
    • Inventario
    • Fabricación
    • PLM
    • Compra
    • Mantenimiento
    • Calidad
    Recursos Humanos
    • Empleados
    • Reclutamiento
    • Ausencias
    • Evaluación
    • Referencias
    • Flota
    Marketing
    • Marketing social
    • Marketing por correo electrónico
    • Marketing por SMS
    • Eventos
    • Automatización de marketing
    • Encuestas
    Servicios
    • Proyecto
    • Partes de horas
    • Servicio de campo
    • Servicio de asistencia
    • Planificación
    • Citas
    Productividad
    • Conversaciones
    • Aprobaciones
    • IoT
    • VoIP
    • Información
    • WhatsApp
    Aplicaciones de terceros Studio de Odoo Plataforma de Odoo Cloud
  • Industrias
    Comercio al por menor
    • Librería
    • Tienda de ropa
    • Tienda de muebles
    • Tienda de ultramarinos
    • Ferretería
    • Juguetería
    Alimentación y hostelería
    • Bar y taberna
    • Restaurante
    • Comida rápida
    • Casa de huéspedes
    • Distribuidor de bebidas
    • Hotel
    Inmueble
    • Agencia inmobiliaria
    • Estudio de arquitectura
    • Construcción
    • Gestión inmobiliaria
    • Jardinería
    • Asociación de propietarios
    Consultoría
    • Empresa contable
    • Partner de Odoo
    • Agencia de marketing
    • Bufete de abogados
    • Adquisición de talentos
    • Auditorías y certificaciones
    Fabricación
    • Textil
    • Metal
    • Muebles
    • Alimentos
    • Brewery
    • Regalos de empresas
    Salud y bienestar
    • Club deportivo
    • Óptica
    • Gimnasio
    • Terapeutas
    • Farmacia
    • Peluquería
    Oficios
    • Handyman
    • Hardware y asistencia informática
    • Sistemas de energía solar
    • Zapatero
    • Servicios de limpieza
    • Servicios de calefacción, ventilación y aire acondicionado
    Otros
    • Organización sin ánimo de lucro
    • Agencia de protección del medio ambiente
    • Alquiler de paneles publicitarios
    • Estudio fotográfico
    • Alquiler de bicicletas
    • Distribuidor de software
    Browse all Industries
  • Comunidad
    Aprender
    • Tutoriales
    • Documentación
    • Certificaciones
    • Formación
    • Blog
    • Podcast
    Potenciar la educación
    • Programa de formación
    • Scale Up! El juego empresarial
    • Visita Odoo
    Obtener el software
    • Descargar
    • Comparar ediciones
    • Versiones
    Colaborar
    • GitHub
    • Foro
    • Eventos
    • Traducciones
    • Convertirse en partner
    • Services for Partners
    • Registrar tu empresa contable
    Obtener servicios
    • Encontrar un partner
    • Encontrar un asesor fiscal
    • Contacta con un experto
    • Servicios de implementación
    • Referencias de clientes
    • Ayuda
    • Actualizaciones
    GitHub YouTube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Solicitar una demostración
  • Precios
  • Ayuda

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

  • CRM
  • e-Commerce
  • Contabilidad
  • Inventario
  • PoS
  • Proyecto
  • MRP
All apps
Debe estar registrado para interactuar con la comunidad.
Todas las publicaciones Personas Insignias
Etiquetas (Ver todo)
odoo accounting v14 pos v15
Acerca de este foro
Debe estar registrado para interactuar con la comunidad.
Todas las publicaciones Personas Insignias
Etiquetas (Ver todo)
odoo accounting v14 pos v15
Acerca de este foro
Ayuda

Zoho.com: Connection unexpectedly closed

Suscribirse

Reciba una notificación cuando haya actividad en esta publicación

Se marcó esta pregunta
emailsmtpzoho
5 Respuestas
38917 Vistas
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
Descartar
Avatar
Keypress
Mejor respuesta

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
Descartar
Avatar
Kai Chang
Mejor respuesta

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
Descartar
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
Mejor respuesta

 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
Descartar
Jornald

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

Avatar
Mohamad Osama
Mejor respuesta

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
Descartar
Avatar
Ab Bot
Mejor respuesta

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
Descartar
¿Le interesa esta conversación? ¡Participe en ella!

Cree una cuenta para poder utilizar funciones exclusivas e interactuar con la comunidad.

Inscribirse
Publicaciones relacionadas Respuestas Vistas Actividad
sending email error
email smtp zoho
Avatar
Avatar
Avatar
2
sept 19
7748
Zoho mail: Connection unexpectedly closed
email smtp zoho
Avatar
Avatar
1
mar 15
8289
outgoing mail server not working with smtp.office365.com Resuelto
email smtp
Avatar
Avatar
Avatar
Avatar
Avatar
14
may 24
237170
Error sending email
email smtp
Avatar
Avatar
Avatar
2
mar 23
6873
When i request a password reminder, i don't get any email
email smtp
Avatar
Avatar
1
may 22
3646
Comunidad
  • Tutoriales
  • Documentación
  • Foro
Código abierto
  • Descargar
  • GitHub
  • Runbot
  • Traducciones
Servicios
  • Alojamiento Odoo.sh
  • Ayuda
  • Actualizar
  • Desarrollos personalizados
  • Educación
  • Encontrar un asesor fiscal
  • Encontrar un partner
  • Convertirse en partner
Sobre nosotros
  • Nuestra empresa
  • Activos de marca
  • Contacta con nosotros
  • Puestos de trabajo
  • Eventos
  • Podcast
  • Blog
  • Clientes
  • Información legal • Privacidad
  • Seguridad
الْعَرَبيّة 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 es un conjunto de aplicaciones de código abierto que cubren todas las necesidades de tu empresa: CRM, comercio electrónico, contabilidad, inventario, punto de venta, gestión de proyectos, etc.

La propuesta única de valor de Odoo es ser muy fácil de usar y totalmente integrado.

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