Skip to content

SMTP I/O Timeout when using gmail as smtp server #408

@agilly1989

Description

@agilly1989

Describe the bug
SMTP I/O Timeout when using gmail as smtp server

To Reproduce
Steps to reproduce the behavior:

  1. Go to Admin > Settings > SMTP
  2. From Email = email address I want it sent from (eg... from@gmail.com)
  3. From Name = Name of email address (set to the name of the gmail address
  4. SMTP host = smtp.gmail.com (validated it can ping it with docker-compose exec app ping smtp.google.com)
  5. Encryption = SSL (as per https://support.google.com/mail/answer/7126229?hl=en#zippy=%2Cstep-change-smtp-other-settings-in-your-email-client)
  6. Port = 465 (as per https://support.google.com/mail/answer/7126229?hl=en#zippy=%2Cstep-change-smtp-other-settings-in-your-email-client)
  7. SMTP Auth = True (as per https://support.google.com/mail/answer/7126229?hl=en#zippy=%2Cstep-change-smtp-other-settings-in-your-email-client)
  8. SMTP Userame = From Email
  9. SMTP = App Password (as generated from https://support.google.com/accounts/answer/185833?sjid=11825684452504850026-AP)
  10. Test Email = My email address

Expected behavior
I receive a test email in my inbox (or spambox)

Text Log

12_answer-app-1  | 2023-06-18 01:39:17.261      INFO    /go/src/github.com/answerdev/answer/answer_build3810709146/vendor/github.com/answerdev/answer/internal/service/export/email_service.go:103      try to send email to [CENSORED]@gmail.com
12_answer-app-1  | 2023-06-18 01:39:27.262      ERROR   /go/src/github.com/answerdev/answer/answer_build3810709146/vendor/github.com/answerdev/answer/internal/service/export/email_service.go:125      send email to [CENSORED]@gmail.com failed: dial tcp 142.251.12.109:465: i/o timeout

Platform (please complete the following information):

  • Device: Docker
  • OS: Docker
  • Version: answerdev/answer:latest

Docker Compose File

version: '3.3'

services:
  mysql:
    image: mariadb:10.11
    restart: always
    volumes:
      - ./db:/var/lib/mysql
    environment:
      - MYSQL_DATABASE=answer
      - MYSQL_USER=root
      - MYSQL_PASSWORD=NotMyPassword
      - MYSQL_ROOT_PASSWORD=NotMyPassword
    networks:
      backend:

  app:
    image: answerdev/answer:latest
    restart: always
    depends_on:
      - mysql

    volumes:
      - ./data:/data
    labels:
      - traefik.enable=true
      - traefik.http.routers.answer.rule=Host(`Not.sharing.xyz`)
      - traefik.http.routers.answer.service=answer
      - traefik.http.routers.answer.tls=true
      - traefik.http.services.answer.loadbalancer.server.port=80
    networks:
      1_networking:
      backend:

networks:
    1_networking:
        name: 1_networking
        ipam:
            config:
                - subnet: 10.10.10.0/24
                
    backend:

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions