I recently coded the Form Submission through SendGrid. However, i have connected up all of my input boxes so that it shows the inputed information on the email, but the Images/Documents inputs aren’t showing any attachments in the email, i am assuming this requires extra attention as it possibly works differently from the normal input text boxes.
My code is:
import {sendEmail} from ‘backend/email’;
import wixWindow from ‘wix-window’;
export function text68_viewportEnter(event) {
const subject = (𝗩𝗮𝗹𝗽𝗮𝗿 𝗕𝘂𝘀𝗶𝗻𝗲𝘀𝘀) - 𝗥𝗲𝗾𝘂𝗲𝘀𝘁 𝗙𝗼𝗿 𝗘𝗺𝗽𝗹𝗼𝘆𝗺𝗲𝗻𝘁 𝗩𝗲𝗿𝗶𝗳𝗶𝗰𝗮𝘁𝗶𝗼𝗻 - ${$w("#input34").value}
;
const body = `𝗥𝗘𝗤𝗨𝗘𝗦𝗧 𝗙𝗢𝗥 𝗘𝗠𝗣𝗟𝗢𝗬𝗠𝗘𝗡𝗧 𝗩𝗘𝗥𝗜𝗙𝗜𝗖𝗔𝗧𝗜𝗢𝗡 ${$w(“#input35”).value}
\rEmployer Date: ${$w(“#datePicker3”).value}
\rTo: ${$w(“#input1”).value}
\rFax Number: ${$w(“#input9”).value}
\rPhone Nuber: ${$w(“#input8”).value}
\rFrom: ${$w(“#input10”).value}
\rRe: Lease Applicant: ${$w(“#input11”).value}
\r𝗧𝗵𝗲 𝗮𝗯𝗼𝘃𝗲-𝗿𝗲𝗳𝗲𝗿𝗲𝗻𝗰𝗲𝗱 𝗟𝗲𝗮𝘀𝗲 𝗔𝗽𝗽𝗹𝗶𝗰𝗮𝗻𝘁 𝗵𝗮𝘀 𝗺𝗮𝗱𝗲 𝗮𝗽𝗽𝗹𝗶𝗰𝗮𝘁𝗶𝗼𝗻 𝘁𝗼 𝗹𝗲𝗮𝘀𝗲 𝗮 𝗽𝗿𝗼𝗽𝗲𝗿𝘁𝘆 𝗳𝗿𝗼𝗺 𝘁𝗵𝗲 𝘂𝗻𝗱𝗲𝗿𝘀𝗶𝗴𝗻𝗲𝗱 𝗽𝗿𝗼𝘀𝗽𝗲𝗰𝘁𝗶𝘃𝗲 𝗟𝗮𝗻𝗹𝗼𝗿𝗱. 𝗧𝗵𝗲 𝗟𝗲𝗮𝘀𝗲 𝗔𝗽𝗽𝗹𝗶𝗰𝗮𝗻𝘁 𝗿𝗲𝗽𝗼𝗿𝘁𝗲𝗱 𝘁𝗵𝗮𝘁 𝗵𝗲 𝗶𝘀 𝗲𝗺𝗹𝗼𝘆𝗲𝗱 𝘄𝗶𝘁𝗵 𝘆𝗼𝘂𝘁 𝗰𝗼𝗺𝗽𝗮𝗻𝘆. 𝗘𝗻𝗰𝗹𝗼𝘀𝗲𝗱 𝗶𝘀 𝗮𝗻 𝗮𝘂𝘁𝗵𝗼𝗿𝗶𝘇𝗮𝘁𝗶𝗼𝗻 𝘁𝗼 𝗿𝗲𝗹𝗲𝗮𝘀𝗲 𝗲𝗺𝗽𝗹𝗼𝘆𝗺𝗲𝗻𝘁 𝗶𝗻𝗳𝗼𝗿𝗺𝗮𝘁𝗶𝗼𝗻. 𝗣𝗹𝗲𝗮𝘀𝗲 𝗽𝗿𝗼𝘃𝗶𝗱𝗲 𝘁𝗵𝗲 𝗳𝗼𝗹𝗹𝗼𝘄𝗶𝗻𝗴: ${$w(“#input35”).value}
\r(1) Beginning date of employment: ${$w(“#datePicker4”).value}
\r(2) Monthly gross income: ${$w(“#input4”).value}
\r(3) Position currently held: ${$w(“#input5”).value}
\r(4) Other relevant Information: ${$w(“#input6”).value}
\rTitle of person completing Form: ${$w(“#input12”).value}
\rName: ${$w(“#input13”).value}
\rPrinted name: ${$w(“#input15”).value}
\rDate: ${$w(“#input14”).value}
\𝗣𝗹𝗲𝗮𝘀𝗲 𝗿𝗲𝘁𝘂𝗿𝗻 𝘁𝗵𝗶𝘀 𝗳𝗼𝗿𝗺 𝗮𝘀 𝘀𝗼𝗼𝗻 𝗮𝘀 𝗽𝗼𝘀𝘀𝗶𝗯𝗹𝗲 𝘁𝗼: ${$w("#input35").value}
\rName: ${$w("#input16").value}
\rPropert Manager: ${$w("#checkboxGroup1").value}
\rFax number: ${$w("#input18").value}
\rPhone number: ${$w("#input17").value}
\rE-mail: ${$w("#input19").value}
\𝗔𝗨𝗧𝗛𝗢𝗥𝗜𝗭𝗔𝗧𝗜𝗢𝗡 𝗧𝗢 𝗥𝗘𝗟𝗘𝗔𝗦𝗘 𝗜𝗡𝗙𝗢𝗥𝗠𝗔𝗧𝗜𝗢𝗡 𝗥𝗘𝗟𝗔𝗧𝗘𝗗 𝗧𝗢 𝗔 𝗥𝗘𝗦𝗜𝗗𝗘𝗡𝗧𝗜𝗔𝗟 𝗟𝗘𝗔𝗦𝗘 𝗔𝗣𝗣𝗟𝗜𝗖𝗔𝗡𝗧 ${$w(“#input35”).value}
\I, ${$w("#input20").value} \r(Applicant, have submitted an application)
\rTo lease a property located at: ${$w("#input21").value}
\rAddress: ${$w("#input25").value}
\rCity: ${$w("#input23").value}
\rState: ${$w("#input24").value}
\rZip: ${$w("#input22").value}
\𝗧𝗵𝗲 𝗹𝗮𝗻𝗱𝗹𝗼𝗿𝗱, 𝗯𝗿𝗼𝗸𝗲𝗿, 𝗼𝗿 𝗹𝗮𝗻𝗱𝗹𝗼𝗿𝗱’𝘀 𝗿𝗲𝗽𝗿𝗲𝘀𝗲𝗻𝘁𝗮𝘁𝗶𝘃𝗲 𝗶𝘀: ${$w("#input35").value}
\Name: ${$w("#input26").value}
\rAddress: ${$w("#input28").value}
\rCity: ${$w("#input27").value}
\rState: ${$w("#input29").value}
\rZip: ${$w("#input30").value}
\rFax: ${$w("#input32").value}
\rPhone: ${$w("#input31").value}
\rE-mail: ${$w("#input33").value}
\𝗨𝗣𝗟𝗢𝗔𝗗 𝗗𝗢𝗖𝗨𝗠𝗘𝗡𝗧𝗔𝗧𝗜𝗢𝗡 ${$w("#input35").value}
\𝗣𝗹𝗲𝗮𝘀𝗲 𝘂𝗽𝗹𝗼𝗮𝗱 𝘆𝗼𝘂𝗿 𝗽𝗮𝘆 𝘀𝘁𝘂𝗯𝘀: ${$w("#input35").value}
\rpay stub 1: ${$w("#uploadButton1").value}
\rpay stub 2: ${$w("#uploadButton2").value}
\rpay stub 3: ${$w("#uploadButton3").value}
\rpay stub 4: ${$w("#uploadButton4").value}
\rpay stub 5: ${$w("#uploadButton5").value}
\rpay stub 6: ${$w("#uploadButton10").value}
\rpay stub 7: ${$w("#uploadButton9").value}
\rpay stub 8: ${$w("#uploadButton8").value}
\rpay stub 9: ${$w("#uploadButton7").value}
\rpay stub 10: ${$w("#uploadButton6").value}
\𝗣𝗹𝗲𝗮𝘀𝗲 𝘂𝗽𝗹𝗼𝗮𝗱 𝘆𝗼𝘂𝗿 𝗜𝗗: ${$w("#input35").value}
\rID : ${$w("#uploadButton11").value}
\r✅I give my permission, ${$w(“#input34”).value}
\r✅(1) to my current and former employers to release any information about my employment history and income history to the above-named person. ${$w(“#checkbox5”).value}
\r✅(2) to my current and former landlords to release any information about my rental history to the above-named person. ${$w(“#checkbox5”).value}
\r✅(3) to my current and former mortgage lenders on propety that i own or have owned to release any information about my mortgage payment history to the above-named person. ${$w(“#checkbox5”).value}
\r✅(4) to my bank, savings and loan, or credit union to provide a verification of funds that i have on deposit to the above-named person and. ${$w(“#checkbox5”).value}
\r✅(5) to the avobe-named person to obtain a copy of my consumer report (credit report) from any consumer reporting agency and to obtain background information about me. ${$w(“#checkbox5”).value}
\r𝗡𝗼𝘁𝗲: 𝗔𝗻𝘆 𝗯𝗿𝗼𝗸𝗲𝗿 𝗴𝗮𝘁𝗵𝗲𝗿𝗶𝗻𝗴 𝗶𝗻𝗳𝗼𝗿𝗺𝗮𝘁𝗶𝗼𝗻 𝗮𝗯𝗼𝘂𝘁 𝗮𝗻 𝗮𝗽𝗽𝗹𝗶𝗰𝗮𝗻𝘁 𝗮𝗰𝘁𝘀 𝘂𝗻𝗱𝗲𝗿 𝘀𝗽𝗲𝗰𝗶𝗳𝗶𝗰 𝗶𝗻𝘀𝘁𝗿𝘂𝗰𝘁𝗶𝗼𝗻𝘀 𝘁𝗼 𝘃𝗲𝗿𝗶𝗳𝘆 𝘀𝗼𝗺𝗲 𝗼𝗿 𝗮𝗹𝗹 𝗼𝗳 𝘁𝗵𝗲 𝗶𝗻𝗳𝗼𝗿𝗺𝗮𝘁𝗶𝗼𝗻 𝗱𝗲𝘀𝗰𝗿𝗶𝗯𝗲𝗱 𝗶𝗻 𝘁𝗵𝗶𝘀 𝗮𝘂𝘁𝗵𝗼𝗿𝗶𝘇𝗮𝘁𝗶𝗼𝗻. 𝗧𝗵𝗲 𝗯𝗿𝗼𝗸𝗲𝗿 𝗺𝗮𝗶𝗻𝘁𝗮𝗶𝗻𝘀 𝗮 𝗽𝗿𝗶𝘃𝗮𝗰𝘆 𝗽𝗼𝗹𝗶𝗰𝘆 𝘄𝗵𝗶𝗰𝗵 𝗶𝘀 𝗮𝘃𝗮𝗶𝗹𝗮𝗯𝗹𝗲 𝘂𝗽𝗼𝗻 𝗿𝗲𝗾𝘂𝗲𝘀𝘁. ${$w(“#checkbox5”).value}`;
sendEmail(subject, body)
.then(response => console.log(response));
}