I figured this out. It was my page code. I posted the working version here: https://www.wix.com/code/home/forum/questions-answers/contact-form-with-sendgrid
–Al
I figured this out. It was my page code. I posted the working version here: https://www.wix.com/code/home/forum/questions-answers/contact-form-with-sendgrid
–Al
On the Matchmaker and Sell tabs (both located under the Shop main tab) are custom forms using a SendGrid API. I am not receiving email notifications after form submissions, although the form data is stored successfully in the databases. Can someone help identify the notification problem?
This is the site → https://www.15hours.com/
Thanks!
Hello!
I’m having the same issue, have 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
Maybe i’m missing some small detail, or is a misconfiguration somewhere else, I’m hoping someone might identify it.
Thanks in advance!
Hi, I also facing similar problem. I have checked and rechecked all the codes. Every thing is fine. My Sendgrid API key is also valid. But emails are not received. My webiste at WIX is https://www.vktyre.com
and user ID is egagan@gmail.com
import {sendEmail} from ‘backend/email’;
$w.onReady( function () {
$w(“#dataset1”).onAfterSave(sendFormData);
});
function sendFormData() {
const subject = Support Form Entry from ${$w("#input1").value}
;
const body = Name: ${$w("#input1").value} \rCity: ${$w("#input3").value} \rMobile: ${$w("#input4").value} \rEmail: ${$w("#input5").value} \rTyre Size: ${$w("#input6").value} \rTyre Serial: ${$w("#input7").value} \rDealer: ${$w("#input8").value} \rCity of Purchase: ${$w("#input9").value} \rDate of Purchase: ${$w("#datePicker1").value} \rIssue: ${$w("#textBox1").value} \rFile: ${$w("#uploadButton1").value}
;
debugger ;
console.log(body);
sendEmail(subject, body)
.then(response=>console.log(response));
}
import {sendWithService} from ‘backend/sendGrid’;
export function sendEmail(subject, body) {
const key = “SG.DmXth5y6T2S8zvu0B_Y3OQ.NWP6rxxxxHczGRmd2Yk40gglhGtpTOkoNG-Dj0-xxxx”;
const sender = “egagan@gmail.com”;
const recipient = “vke.india@gmail.com”;
return sendWithService(key, sender, recipient, subject, body);
}
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}&text=${body}
;
const request = {
“method”: “post”,
“headers”: headers,
“body”: data
};
return fetch(url, request)
.then(response => response.json());
}
PLESAE HELP