Browse Source

docs(email-plugin): Add note on troubleshooting SMTP connections

Michael Bromley 5 years ago
parent
commit
a0252fd333
1 changed files with 29 additions and 0 deletions
  1. 29 0
      packages/email-plugin/src/plugin.ts

+ 29 - 0
packages/email-plugin/src/plugin.ts

@@ -137,6 +137,35 @@ import {
  * In dev mode, specifying the optional `mailboxPort` will start a webmail-like interface available at the `/mailbox` path, e.g.
  * http://localhost:3000/mailbox. This is a simple way to view the output of all emails generated by the EmailPlugin while in dev mode.
  *
+ * ## Troubleshooting SMTP Connections
+ *
+ * If you are having trouble sending email over and SMTP connection, set the `logging` and `debug` options to `true`. This will
+ * send detailed information from the SMTP transporter to the configured logger (defaults to console). For maximum detail combine
+ * this with a detail log level in the configured VendureLogger:
+ *
+ * ```TypeScript
+ * const config: VendureConfig = {
+ *   logger: new DefaultLogger({ level: LogLevel.Debug })
+ *   // ...
+ *   plugins: [
+ *     EmailPlugin.init({
+ *       // ...
+ *       transport: {
+ *         type: 'smtp',
+ *         host: 'smtp.example.com',
+ *         port: 587,
+ *         auth: {
+ *           user: 'username',
+ *           pass: 'password',
+ *         },
+ *         logging: true,
+ *         debug: true,
+ *       },
+ *     }),
+ *   ],
+ * };
+ * ```
+ *
  * @docsCategory EmailPlugin
  */
 @VendurePlugin({