Skip to content

Commit 85dc842

Browse files
authored
Create Samples.gs
Added code to generate 3 sample emails
1 parent da04611 commit 85dc842

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

gmail-sentiment-analysis/Samples.gs

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
/**
2+
* Create sample emails
3+
*/
4+
function generateSampleEmails() {
5+
// Get active user's email
6+
var userEmail = Session.getActiveUser().getEmail();
7+
8+
// Send emails
9+
GmailApp.sendEmail(
10+
userEmail,
11+
"Thank you for amazing service!",
12+
"Hi, I really enjoyed working with you. Thank you again!",
13+
{
14+
name: 'Customer A',
15+
},
16+
);
17+
18+
GmailApp.sendEmail(
19+
userEmail,
20+
"Request for information",
21+
"Hello, I need more information on your recent product launch. Thank you.",
22+
{
23+
name: 'Customer B',
24+
},
25+
);
26+
27+
GmailApp.sendEmail(
28+
userEmail,
29+
"Complaint!",
30+
"Hello, You are late in delivery, again. Please contact me ASAP before I cancel our subscription.",
31+
{
32+
name: 'Customer C',
33+
},
34+
);
35+
36+
console.log("Sample email generation completed.")
37+
}

0 commit comments

Comments
 (0)