postalsys / emailengine

Headless email client
https://emailengine.app/
Other
1.9k stars 169 forks source link

iCloud SMTP fails with SSL error #381

Closed artyres1 closed 1 year ago

artyres1 commented 1 year ago

Hello, I can read emails from iCloud but cannot send. The submit fails with

"C0320000:error:0A00010B:SSL routines:ssl3_get_record:wrong version number:C:\Users\runneradmin\AppData\Local\Temp\pkg.24e0b2b2d51e47b9dba34c30\node\deps\openssl\openssl\ssl\record\ssl3_record.c:355:\n","stacktrace":["Error: C0320000:error:0A00010B:SSL routines:ssl3_get_record:wrong version number:C:\Users\runneradmin\AppData\Local\Temp\pkg.24e0b2b2d51e47b9dba34c30\node\deps\openssl\openssl\ssl\record\ssl3_record.c:355:\n\n at MessagePort. (C:\snapshot\emailengine-master\workers\submit.js)\n at [nodejs.internal.kHybridDispatch] (node:internal/event_target:645:20)\n at exports.emitMessage (node:internal/per_context/messageport:23:28)","Error: C0320000:error:0A00010B:SSL routines:ssl3_get_record:wrong version number:C:\Users\runneradmin\AppData\Local\Temp\pkg.24e0b2b2d51e47b9dba34c30\node\deps\openssl\openssl\ssl\record\ssl3_record.c:355:\n\n at MessagePort. (C:\snapshot\emailengine-master\workers\submit.js)\n at [nodejs.internal.kHybridDispatch] (node:internal/event_target:645:20)\n at exports.emitMessage (node:internal/per_context/messageport:23:28)","Error: C0320000:error:0A00010B:SSL routines:ssl3_get_record:wrong version number:C:\Users\runneradmin\AppData\Local\Temp\pkg.24e0b2b2d51e47b9dba34c30\node\deps\openssl\openssl\ssl\record\ssl3_record.c:355:\n\n at MessagePort. (C:\snapshot\emailengine-master\workers\submit.js)\n at [nodejs.internal.kHybridDispatch] (node:internal/event_target:645:20)\n at exports.emitMessage (node:internal/per_context/messageport:23:28)"

My config looks like this

const smtpObject = {
    host: 'smtp.mail.me.com',
    port: 587,
    secure: true,
};
                smtp: {
                    host: smtpObject.host,
                    port: smtpObject.port,
                    secure: smtpObject.secure,
                    auth: {
                        user: email,
                        pass: pass,
                    },
                    tls: {
                        rejectUnauthorized: true,
                        "minVersion": "TLSv1.2"
                    },
                }

I built emailengine from scratch on Windows for 64 bit ...

artyres1 commented 1 year ago

i had to set secure false then it works!

https://github.com/postalsys/emailengine/issues/247