SendGrid not working (no responses in console)

Hello!
I’ve searched in forums and found similar issues, but no solutions worked for me so far.
Here’s the deal:
I’ve setup form, database and codes to send a mail upon form submission, based on this tutorial

but it haven’t worked so far. In console, tried logging before and after the point where mails should be sent, and code seems to be running ok, no breaks.
I read the codes a thousand times, sarched for case mismatches in filenames, tried changing IDs, API keys, language in Sendgrid configs, and a bunch of other stuff. I’m no expert so I’ve run out of options, so I’d like some help…
I’m seeing no errors in console, no email is delivering (or even being sent, as SendGrid activity is still empty).
My page is https://www.wbarmarios.com.br/fale-conosco and i’m attaching my codes as images below.
Maybe i’m missing some small detail, or is a misconfiguration somewhere else, I’m hoping someone might identify it.
Thanks in advance!

in your email.jsw line 3

write backend/SendGrid instead of backend/sendGrid

Well I’m quite ashamed now. As I said, I’ve searched for these mismatches for a while, I guess we just need to step back and take a break sometimes to see things clearer.
It has indeeed worked as soons as I changed it, thank you very much, shan!
I can now continue to work without raging at my screen.

For those who face the same problem: check. cases. thoroughly.

Hi!

Can anyone help to check what’s wrong with my code… I don’t receive any email notification using sendGrid. Below are my code:

– email.jsw
//email.jsw

import {sendWithService} from ‘backend/sendGrid’;

export function sendEmail(subject, body) {
const key = “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”;
const sender = “xxxx@yahoo.com”;
const recipient = “xxxxx@yahoo.com”;

return sendWithService(key, sender, recipient, subject, body);
}

export function sendEmailWithRecipient(subject, body, recipient) {
const key = “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”;
const sender = “xxxx@yahoo.com”;
return sendWithService(key, sender, recipient, subject, body);
}

–sendGrid.js

//sendGrid.js

import {fetch} from ‘wix-fetch’;

export function sendWithService(key, sender, recipient, subject, body)
{
const URL = “https://api.sendgrid.com/api/mail.send.json”;
const Headers = {“Authorization”:"Bearer " + key, “Content-Type”:“application/x-www-form-urlencoded”};
const Data = from =${sender}&to=${recipient}&subject=${subject}&html=${body};
const Request = {“method”:“post”, “headers”:Headers, “body”:Data};
return fetch(URL, Request).then(Response => Response.json());
}

–page

import {sendEmail, sendEmailWithRecipient} from ‘backend/email’;

$w.onReady( function () {
$w(“#dataset1”).onAfterSave(sendFormData);
});

function sendFormData() {
const subject = New Submission ${$w("#input1").value};
const body = Name: ${$w("#input1").value} \rEmail: ${$w("#input2").value} \rComments: ${$w("#textBox1").value};
const recipient = $w(“#input2”).value;

sendEmailWithRecipient(subject, body, recipient) 
    .then(response => console.log(response)); 

sendEmail(subject, body) 
    .then(response => console.log(response)); 

}

please use code block or post screenshots.

Your code in unreadable

Sorry please find my code below:

@eera148 just to clear a doubt.

Can you delete lines 1-4 on your Page Code & then try.

@shantanukumar847 , already deleted that line but still not working and didn’t receive any email…

@eera148 are the entries being saved into the database ??

@shantanukumar847 yup. Data has been successfully saved into the database but I still didn’t receive any email notification.