Giter Site home page Giter Site logo

fastify-mailer's People

Contributors

coopflow avatar dependabot[bot] avatar greenkeeper[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

lgs yusuf-khamis

fastify-mailer's Issues

Question: ES6 import syntax

I'm try this plugin and I use ES6.
if I do:
import * as zio from 'fastify-mailer'
or
import { fastifyMailer } from 'fastify-mailer'
or
import zio from 'fastify-mailer'

I get:

Error: Unexpected token (Note that you need @rollup/plugin-json to import JSON files)
// ...
{                                                                                                                                                                   
2:     "name": "nodemailer",                                                                                                                                           
             ^                                                                                                                                                         
3:     "version": "6.6.1",      

the error seams on nodemailer but is due to my try to use import for fastify-mailer.
if I use require(), all go well.

Someone know the right ES6 syntax for import this plugin?

best regards,
Leonardo

P.S.
reading manual is not help me.

Hi, Does it's work with google OAuth2?

Hi, How I can make this work?

I did not find the way to do in OAuth2 :)

This code is from my last server with express

const transport = nodemailer.createTransport({
         service:'gmail',
         auth: {
             type: 'OAuth2',
             user: process.env.USER, 
     
             clientId: process.env.CLIENT_ID,
             clientSecret: process.env.CLIENT_SECRET ,
             refreshToken: process.env.REFRESH_TOKEN,
             accessToken: process.env.ACCESS_TOKEN
         }
       });
       
       transport.use('compile', hbs({
         viewEngine: 'express-handlebars', //TEST
         viewPath: './views/'
       }));
       nodemailer.sendMail({mail_options}, (err, info) => {
         if (err){
          reply.code(500).send({ 
            success:false,
            data: 'Une erreur sait produite lors de l\'envoie du mail...!'
        })
       

Thank

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.