APIv3-typescript-library icon indicating copy to clipboard operation
APIv3-typescript-library copied to clipboard

Deprecated, what are the alternatives?

Open juherr opened this issue 2 years ago • 15 comments
trafficstars

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?

juherr avatar Aug 18 '23 11:08 juherr

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.

cwierzbicki00 avatar Aug 22 '23 23:08 cwierzbicki00

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 avatar Aug 23 '23 11:08 juherr

Related to https://github.com/getbrevo/brevo-node/issues/1

juherr avatar Sep 08 '23 12:09 juherr

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

NiklasPor avatar Oct 09 '23 07:10 NiklasPor

Any update on alternatives??

naeem-qv avatar Jan 04 '24 07:01 naeem-qv

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

NiklasPor avatar Jan 04 '24 08:01 NiklasPor

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 avatar Jan 04 '24 09:01 naeem-qv

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

can't we use nodemailer with brevo?

naeem-qv avatar Jan 16 '24 06:01 naeem-qv

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.

IvanHeyMan avatar Feb 20 '24 18:02 IvanHeyMan

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 avatar Feb 21 '24 10:02 naeem-qv

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 avatar Feb 21 '24 13:02 naeem-qv

its from brevo docs https://developers.brevo.com/docs/node-smtp-relay-example#trigger-your-email

naeem-qv avatar Feb 21 '24 13:02 naeem-qv

`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 avatar Feb 21 '24 18:02 IvanHeyMan

`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

IvanHeyMan avatar Feb 21 '24 18:02 IvanHeyMan

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

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

ryanschiang avatar Apr 16 '24 21:04 ryanschiang