=IF(A2="", "No email", IF(ISERROR(SEARCH("@", A2)), "Invalid email", "Ready to send")) in cell B2, what will be the output if A2 contains userexample.com?The formula checks if cell A2 is empty first. If not, it looks for '@' in the email. Since userexample.com lacks '@', it returns "Invalid email".
MailApp.sendEmail() is the correct function to send emails from Google Sheets scripts. GmailApp also sends emails but is more for Gmail-specific actions.
Option D automates sending personalized emails directly from the sheet using a script. Other options are manual or invalid (no =EMAIL() formula exists).
If the email address is empty, MailApp.sendEmail() throws a TypeError because it requires a valid recipient address.
Out of 5 rows, 2 emails are empty (no '@'), 1 email missing '@', so only 2 emails have '@'. The script sends emails only if '@' is present, so 2 emails sent.
But the question states 2 empty and 1 missing '@', so 5 - 3 = 2 emails sent.