Skip to content

Commit 5da86cb

Browse files
setup auto reply
1 parent 3bb84be commit 5da86cb

File tree

2 files changed

+40
-1
lines changed

2 files changed

+40
-1
lines changed

src/components/app-profile-page/app-profile-page.tsx

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,25 @@ export class AppProfile {
8080

8181
</table>
8282

83+
<p>My other Projects:</p>
84+
<table>
85+
<tr>
86+
<th>Github Pages</th>
87+
<th>URL</th>
88+
<th>Technology</th>
89+
</tr>
90+
<tr>
91+
<td>stenciljs-components</td>
92+
<td><a href="https://sanjeetkumaritoutlook.github.io/stenciljs-components/" target="_blank">Visit</a></td>
93+
<td>StencilJS</td>
94+
</tr>
95+
<tr>
96+
<td>consuming-angular-app</td>
97+
<td><a href="https://sanjeetkumaritoutlook.github.io/consuming-angular-app/" target="_blank">Visit</a></td>
98+
<td>Angular</td>
99+
</tr>
100+
</table>
101+
83102
</div>
84103
);
85104
}

src/components/feedback-form/feedback-form.tsx

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,27 @@ export class FeedbackForm {
362362
.then((response) => {
363363
console.log('Email sent successfully', response.status, response.text);
364364
alert('Email sent successfully!');
365-
})
365+
366+
// Sending auto-reply email
367+
emailjs
368+
.send(
369+
'service_2q5gm3h', // Your EmailJS service ID
370+
'template_57gcu0o', // Auto-reply template ID
371+
{
372+
user_name: this.userName,
373+
user_email: this.userEmail,
374+
},
375+
'IRGsyXDXq7ZJHMbzF' // Your EmailJS user ID
376+
)
377+
.then((response) => {
378+
console.log('Auto-reply email sent successfully', response);
379+
alert('Feedback sent, and an auto-reply email was sent to the user!');
380+
})
381+
.catch((error) => {
382+
console.error('Error sending auto-reply email', error);
383+
});
384+
385+
}) //this is first feedback then endinng parantheses, auto-reply is placed inside this above
366386
.catch((error) => {
367387
console.error('Error sending email', error);
368388
alert('Failed to send email');

0 commit comments

Comments
 (0)