I have managed to set html email notifications. All the elements I need are included in the emails, however, I just cannot align-center those elements (2 images and a couple of text lines) and add some line breaks (… kind of …). I have used, div, p, span, … all of them … I also read all the suggested articles …but cannot make it …
I hope someone can take a look at it and tell me what I am missing in my code. The code below just has
now for the images and some formatting for the text.
Thanks!!
function sendFormData() {
const subject = Thank you **for** Subscribing ${$w("#input1").value};
const body = `
I am trying to use a table in my email to format the data. However, the table does not render. Is that an issue with using a table in sendgrid? Or, is there something special to get it recognized?
I have followed your post and now have email being sent through emailjs - thanks so much for sharing that! One question - I really need to be able to send an attachment (a photo), but I am not sure how to do that - do you have an example of how the parameter for that should look? I have upgraded to the emailjs personal account which should allow attachments, but I am just unsure how the Wix code should look.
@stevebarton998 Hey Steve, good to know it worked for you. True answer is: “don´t know”. Never sent attachments. But I will look into it next week (Mon/Tue), see what I can come up with.
I have setup a html email notification but the \r does not put the information on the next line can anyone help with this? It works fine when I change to a text email. I want HTML as I am also sending a html footer from sendgrid and it doesnt work if I change the sendgrid.js file to text. See below for my code: Instead of breaking to next line it looks like this:
//email on submission
import {
sendEmail,
sendEmailWithRecipient
} from ‘backend/email’;
$w.onReady( function () {
$w(“#button1”).onClick(sendFormData);
// $w(“#dataset1”).onAfterSave(sendFormData);hh
});
//
function sendFormData() {
const subject = ${$w("#input1").value} Thank you **for** registering **with** GameChangerz University;
const body = `${$w(“#input1”).value}, Thank you for registering with GameChangerz University! The following information includes your registration details:
\rAthlete1: ${$w(“#input2”).value}
\rAthlete Birthday: ${$w(“#datePicker1”).value}
\rService: ${$w(“#dropdown7”).value}
\rCommitment: ${$w(“#dropdown8”).value}
\rDays of Week: ${$w(“#checkboxGroup1”).value}
\rParent: ${$w(“#input1”).value}
\rParent Phone: ${$w(“#input6”).value}
\rParent Email: ${$w(“#input9”).value}