Closed Ayesha-Siddiqua88 closed 2 months ago
@Ayesha-Siddiqua88 is attempting to deploy a commit to the Sanchit Bajaj's projects Team on Vercel.
A member of the Team first needs to authorize it.
The Newsletter
component in src/components/core/newsletter/index.tsx
has been updated to send an automated thank you email through emailjs-com
when a form is submitted. This includes directly updating the subscriberEmail
state on input changes and handling success/error responses for the email submission. The handleChange
function is now commented out since its functionality has been incorporated directly into the input event handler.
File/Path | Change Summary |
---|---|
src/components/core/newsletter/index.tsx |
Commented out handleChange function, updated handleSubmit to send email with emailjs-com , included success/error handling. |
sequenceDiagram
participant User
participant Form as Newsletter Form
participant EmailJS as EmailJS Service
participant UI as User Interface
User->>+Form: Fills email and submits form
Form-->>Form: Process submission
Form-->>EmailJS: Send email with subscription details
EmailJS-->>Form: Confirm email sent
Form-->>UI: Show "Subscribed to Newsletter" alert
UI-->>User: Alert notification
EmailJS-->>User: Receive thank you email
Objective | Addressed | Explanation |
---|---|---|
Automated thank you email for newsletter subscription (#391) | ✅ | |
Alert with "Subscribed to Newsletter" message on subscribe button click (#391) | ✅ |
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Related Issue
fixes: #391
Description
Added the feature of sending mails to user when thy subscribe to newsletter using Emailjs.
Screenshots
success console message on clicking 'subscribe' button:
email sent:
Summary by CodeRabbit
emailjs-com
, providing better feedback on submission success or failure.