I'm trying to set up trigger emails through Firebase. I've read other Stackoverflow posts which led me to 1) enable SMTP authentication within my mailbox settings 2) try changing the port to 587 to 465, both of which haven't completely solved the problem for me.
My SMTP Connection URI string is (currently): smtps://{email}@smtp.office365.com:587
When I enable port 587, I get an error in the Firebase Logs and in my Mail status ssl3_get_recrod: wrong version number
:
Firebase Error Log:
{
"textPayload": "Error: Error when delivering message=mail/vfKZ9yWVqCYLCg46FGeV: Error: 68429112612736:error:1408F10B:SSL routines:ssl3_get_record:wrong version number:../deps/openssl/openssl/ssl/record/ssl3_record.c:332:\n\n at entryFromArgs (/workspace/node_modules/firebase-functions/lib/logger/index.js:130:19)\n at Object.error (/workspace/node_modules/firebase-functions/lib/logger/index.js:116:11)\n at Object.deliveryError (/workspace/lib/logs.js:50:33)\n at deliver (/workspace/lib/index.js:247:14)\n at processTicksAndRejections (internal/process/task_queues.js:95:5)\n at async processWrite (/workspace/lib/index.js:372:9)\n at async /workspace/lib/index.js:384:9",
"insertId": "641f09ee0009d79eb6c3885d",
"resource": {
"type": "cloud_function",
"labels": {
"project_id": {projectName},
"function_name": "ext-firestore-send-email-processQueue",
"region": "us-central1"
}
},
"timestamp": "2023-03-25T14:49:18.645022Z",
"severity": "ERROR",
"labels": {
"instance_id": "00c61b117c8cf42dc047a1b1d60eb236e452f4ee021b27b8382e81b77bbbca98393f88700863f1d220c139207106596cda24918c509a83aafbab",
"execution_id": "q8sjsk1of21n"
},
"logName": "projects/{projectName}/logs/cloudfunctions.googleapis.com%2Fcloud-functions",
"trace": "projects/{projectName}/traces/b1849fd9bdc594880a76f221b90bd1a5",
"receiveTimestamp": "2023-03-25T14:49:18.949736847Z"
}
When I switch to port 465, I get the following status and error logs:
{
"textPayload": "Error: message=mail/oeS05l1COLA9R7ftTh9X is missing 'delivery' field\n at entryFromArgs (/workspace/node_modules/firebase-functions/lib/logger/index.js:130:19)\n at Object.error (/workspace/node_modules/firebase-functions/lib/logger/index.js:116:11)\n at Object.missingDeliveryField (/workspace/lib/logs.js:54:33)\n at /workspace/lib/index.js:299:18\n at processTicksAndRejections (internal/process/task_queues.js:95:5)\n at async Transaction.runTransaction (/workspace/node_modules/@google-cloud/firestore/build/src/transaction.js:362:26)\n at async processWrite (/workspace/lib/index.js:281:35)\n at async /workspace/lib/index.js:384:9",
"insertId": "641e4ef200040bb705849307",
"resource": {
"type": "cloud_function",
"labels": {
"region": "us-central1",
"function_name": "ext-firestore-send-email-processQueue",
"project_id": {projectName}
}
},
"timestamp": "2023-03-25T01:31:30.265143Z",
"severity": "ERROR",
"labels": {
"execution_id": "kou4acaookby",
"instance_id": "00c61b117cb72655bc0eaf74dd89e172e987d9d363da50fef7fa612271e2f48b3d4aa10f70bcd7fab115a715cfe71eaecb1776bc7acc1655c35f"
},
"logName": "projects/{projectName}/logs/cloudfunctions.googleapis.com%2Fcloud-functions",
"trace": "projects/{projectName}/traces/16bf16e8b815bdfdaa3ab06555939921",
"receiveTimestamp": "2023-03-25T01:31:30.447690209Z"
}
I'm not really sure what to try next. Any help is appreciated, thanks.