Firebase触发器电子邮件在处理时卡住或失败,ssl3_get_record:版本错误

plupiseo  于 2023-03-31  发布在  其他
关注(0)|答案(1)|浏览(149)

我正在尝试通过Firebase设置触发电子邮件。我读过其他Stackoverflow的帖子,这些帖子让我1)在邮箱设置中启用SMTP身份验证2)尝试将端口更改为587到465,这两种方法都没有完全解决我的问题。
我的SMTP连接URI字符串(当前)是:smtps://{email}@smtp.office365.com:587
当我启用端口587时,在Firebase日志和邮件状态ssl3_get_recrod: wrong version number中出现错误:

Firebase错误日志:

{
  "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"
}

当我切换到端口465时,我得到了以下状态和错误日志:

{
  "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"
}

我真的不知道下一步该怎么做。任何帮助都很感激,谢谢。

4ioopgfo

4ioopgfo1#

根据这个github问题,你应该使用smtp而不是smtps,端口为587,这解决了这个问题。

firebase在587端口上使用smtp.host.com的firebase身份验证模板的SMTP设置。
尽管您也可以使用Trigger Email extension自动完成此操作,而不是使用单独的smtp服务。

相关问题