Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecated, what are the alternatives? #71

Open
juherr opened this issue Aug 18, 2023 · 15 comments
Open

Deprecated, what are the alternatives? #71

juherr opened this issue Aug 18, 2023 · 15 comments

Comments

@juherr
Copy link

juherr commented Aug 18, 2023

I want to integrate brevo in my project and the documentation redirect here.

I see that the project is deprecated since yesterday and it was already the case for libraries in some other languages like php.

What are the alternatives? What should I use instead of the typescript library?

@cwierzbicki00
Copy link

Seriously, why are we not using Typescript anymore?

Need some information on what the update plan is. I have not found any communication about this.

@juherr
Copy link
Author

juherr commented Aug 23, 2023

As I understand, there is a move to https://github.com/getbrevo but clients are deprecated before the release of the alternative 😅
Unfortunately the communication looks less good than the product 😬

@juherr
Copy link
Author

juherr commented Sep 8, 2023

Related to getbrevo/brevo-node#1

@NiklasPor
Copy link

The docs are also still pointing to this library, if you check the TS tab? 🤔
https://developers.brevo.com/reference/createdoicontact

@naeem-qv
Copy link

naeem-qv commented Jan 4, 2024

Any update on alternatives??

@NiklasPor
Copy link

I figured the alternative is switching to a different communication provider 🙄

@naeem-qv
Copy link

naeem-qv commented Jan 4, 2024

I figured the alternative is switching to a different communication provider 🙄

I was thinking of going with sendGrid, is it a good alternative?

@naeem-qv
Copy link

I figured the alternative is switching to a different communication provider 🙄

can't we use nodemailer with brevo?

@IvanHeyMan
Copy link

I figured the alternative is switching to a different communication provider 🙄

can't we use nodemailer with brevo?

Ya, I just ended up using nodemailer and the smtp relay from brevo cause they offer the 300 emails a day on the free plan. Although it would be nice to try out their api with typescript.

@naeem-qv
Copy link

I figured the alternative is switching to a different communication provider 🙄

can't we use nodemailer with brevo?

Ya, I just ended up using nodemailer and the smtp relay from brevo cause they offer the 300 emails a day on the free plan. Although it would be nice to try out their api with typescript.

Yep that would be nice, they should maintain their packages or at least give some attention to deprecated ones

@naeem-qv
Copy link

image

I figured the alternative is switching to a different communication provider 🙄

can't we use nodemailer with brevo?

Ya, I just ended up using nodemailer and the smtp relay from brevo cause they offer the 300 emails a day on the free plan. Although it would be nice to try out their api with typescript.

can you please tell me what to put in auth:{user:..., pass:......} I tried with brevo email as in username and password but its getting authentication fail errrors

@naeem-qv
Copy link

@IvanHeyMan
Copy link

`import { NextRequest, NextResponse } from "next/server";
import nodemailer from 'nodemailer'

export async function POST(request:NextRequest) {

try {
    const {firstName, lastName, email, message} = await request.json();

    const transporter = nodemailer.createTransport({
        host: 'smtp-relay.brevo.com',
        port: 587,
        auth: {
            user: process.env.EMAIL_FROM,
            pass: process.env.BREVO_KEY,
        }
    })

    const mailOption = {
        from: email,
        to: process.env.EMAIL_FROM,
        subject: 'New Contact Form Submission!',
        templateId:2,
        text: `Hello,
        
        You have a new form entry from ${firstName} ${lastName} ${email}.
        
        ${message}
        
        :)`,
    }

    await transporter.sendMail(mailOption)

    return NextResponse.json({message:'Email sent successfully'}, {status:200})

} catch (error:any) {
    return NextResponse.json({message:'Failed sending email'}, {status:500})
}

}`

In your dashboard on brevo, if you go to smtp & api it will show you your SMTP key value. That is the value you need to give they auth:pass

@IvanHeyMan
Copy link

`import { NextRequest, NextResponse } from "next/server"; import nodemailer from 'nodemailer'

export async function POST(request:NextRequest) {

try {
    const {firstName, lastName, email, message} = await request.json();

    const transporter = nodemailer.createTransport({
        host: 'smtp-relay.brevo.com',
        port: 587,
        auth: {
            user: process.env.EMAIL_FROM,
            pass: process.env.BREVO_KEY,
        }
    })

    const mailOption = {
        from: email,
        to: process.env.EMAIL_FROM,
        subject: 'New Contact Form Submission!',
        templateId:2,
        text: `Hello,
        
        You have a new form entry from ${firstName} ${lastName} ${email}.
        
        ${message}
        
        :)`,
    }

    await transporter.sendMail(mailOption)

    return NextResponse.json({message:'Email sent successfully'}, {status:200})

} catch (error:any) {
    return NextResponse.json({message:'Failed sending email'}, {status:500})
}

}`

In your dashboard on brevo, if you go to smtp & api it will show you your SMTP key value. That is the value you need to give they auth:pass

The user is your Login/Email if that wasn't clear

@ryanschiang
Copy link

For future reference, it seems the new Node SDK with TS support is here:

https://github.com/getbrevo/brevo-node

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants