urania-dev / snapp

Yet Another Url Shortner. A simple excercise to learn Svelte.
https://snapp.li
MIT License
210 stars 11 forks source link

SMTP issue #46

Closed zarevskaya closed 2 months ago

zarevskaya commented 2 months ago

Hello :)

I try to add my mail server but I get this error:

SMPT Setup: configuration added to the database.
[Error: E8D137D44A7F0000:error:0A00010B:SSL routines:ssl3_get_record:wrong version number:../deps/openssl/openssl/ssl/record/ssl3_record.c:354:
] {
  library: 'SSL routines',
  reason: 'wrong version number',
  code: 'ESOCKET',
  command: 'CONN'
}

I'm using 587 port. I can't use 465. Any hint for me?

Thanks and have a nice day!

urania-dev commented 2 months ago

What Is your configuration?

zarevskaya commented 2 months ago

My configuration :)

Screenshot_20240917_095455


services:
  snapp:
    image: uraniadev/snapp:latest
    ports:
      - 9999:3000
    environment:
      SMTP_HOST: smtp.xxx.xx 
      SMTP_USER: zarev@belginux.com 
      SMTP_PASS: xxxxxxxxxx  
      SMTP_FROM: zarev@belginux.com 
      SMTP_PORT: 587 
      DATABASE_MYSQL_URL: 'mysql://root:test@mariadb:3306/snappdb'
      TOKEN_SECRET: hf1qB8PhqJK60BMF8hpKbJq4zUj3uu9Jc+/fAw4X9IA=  # openssl rand -base64 32
      ORIGIN: https://snapp.mm2.be
      DATABASE_PROVIDER: mysql
    depends_on:
      mariadb:
        condition: service_healthy
    networks:
      - snapp

  mariadb:
    image: mariadb:latest
    environment:
      MYSQL_ROOT_PASSWORD: test
      MYSQL_DATABASE: snappdb
    volumes:
      - ./db:/var/lib/mysql
    networks:
      - snapp
    healthcheck:
      test: ['CMD', 'healthcheck.sh', '--su-mysql', '--connect', '--innodb_initialized']
      start_period: 1m
      start_interval: 10s
      interval: 1m
      timeout: 5s
      retries: 3
networks:
  snapp:
    external: false````

Thanks
urania-dev commented 2 months ago

sorry I meant the smtp configuration.

Anyway i'm trying to set the SSL boolean to a variable, and also trying to extract smtp configuration to a file to be replaced mounting docker for more deep configuration of nodemailer (this afternoon i'll try to upload a 0.8.6.2 :) )

btw, nodemailer states in their doc that 587 require secure to false, that i hardcoded to true, that's why it doesn't work.

i'll fix this

zarevskaya commented 2 months ago

Thank you very much :) Post edited.

Thanks again.

urania-dev commented 2 months ago

i just finisheed building the 0.8.6.2 that will include SSL Checkbox in settings and external smtp.config.cjs for further configuration. let me know if that works for you :)

zarevskaya commented 2 months ago

Hello,

Excellent responsiveness! THANKS. Yes, everything works perfectly!

Screenshot_20240917_133119

Screenshot_20240917_133253

Merci :)