npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@logto/connector-smtp

v1.2.0

Published

SMTP connector implementation.

Downloads

130

Readme

SMTP connector

The official Logto connector for SMTP.

Table of contents

Get started

The SMTP (Simple Mail Transfer Protocol) is an internet standard communication protocol for electronic mail transmission. Mail servers and other message transfer agents use SMTP to send and receive messages.

Set up SMTP connector

SMTP is a transmission protocol that is not exclusive to some specific email service providers but can work with all providers.

We are now offering guides on how to use the SMTP connector to send emails following providers for your better understanding:

  • Gmail is the most popular email service vendor worldwide.
  • Aliyun direct mail and SendGrid mail. Some of you might be familiar with these two email service providers because Logto Team provided corresponding connectors; you will likely have a general idea of them.

We hope you can figure out all other email vendors' setups with the following examples :rocket:

Set up for Gmail use

You can get a new Gmail account at Gmail, or you can use an existing account if you have one.

A Gmail official post shows how to determine required properties' values to operate Gmail via an SMTP connector.

Integrate with SendGrid SMTP API

Initially, we assume that you already have a SendGrid account. If not, create a new account at the SendGrid website.

You can find a step-by-step guide on "Integrating with the SMTP API".

Developers can access sender details on the "Sender Management".

Configure with Aliyun direct mail account

Sign in to the Aliyun website. Register a new account if you don't have one.

Follow the Send emails using SMTP guide and finish those 'tasks' to get those required settings and information.

You can go to SMTP service address page to choose a proper SMTP service address host and port number.

To check "Sender Addresses", you can find the entrance on the left-side navigation pane on DirectMail console. You should see Sender address and SMTP Password here.

ℹ️ Note

Only one sample template is provided in the previous cases to keep things simple. You should add more templates for other use cases. You should change values wrapped with "<" and ">" according to your Gmail, SendGrid or Aliyun account settings and choose to keep other fields w/o "<" and ">". Add {{code}} as a placeholder in templates' content to show random verification code in sending emails.

Test SMTP connector

You can type in an email address and click on "Send" to see whether the settings can work before "Save and Done".

That's it. Don't forget to Enable connector in sign-in experience.

Config types

| Name | Type | |-----------|------------| | host | string | | port | string | | fromEmail | string | | templates | Template[] |

| Template Properties | Type | Enum values | |---------------------|-------------|------------------------------------------------------| | subject | string | N/A | | content | string | N/A | | usageType | enum string | 'Register' | 'SignIn' | 'ForgotPassword' | 'Generic' | | contentType | enum string | 'text/plain' | 'text/html' |

Username and password Auth Options

| Name | Type | Enum values | |------|------------------------|-------------| | user | string | N/A | | pass | string | N/A | | type | enum string (OPTIONAL) | 'login' |

You can also configure OAuth2 Auth Options and other advanced configurations. See here for more details.

We gave an example config with all configurable parameters in the text box to help you to set up own configuration. (You are responsible to the configuration, some values are for demonstration purpose and may not fit your use case.)