Skip to content

Commit d0c0a77

Browse files
committed
feat(email): add sender email to sendOtpEmail
- Added `senderEmail` parameter. - Updated documentation. - Improved function clarity.
1 parent 32ff0b1 commit d0c0a77

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/src/ht_email_repository.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,19 +23,22 @@ class HtEmailRepository {
2323
/// constructs the required `templateData` and calls the generic
2424
/// `sendTransactionalEmail` method on the injected [HtEmailClient].
2525
///
26+
/// - [senderEmail]: The email address of the sender.
2627
/// - [recipientEmail]: The email address of the recipient.
2728
/// - [otpCode]: The One-Time Password to be sent.
2829
/// - [templateId]: The ID of the transactional email template to use.
2930
///
3031
/// Throws [HtHttpException] subtypes on failure, as propagated from the
3132
/// client.
3233
Future<void> sendOtpEmail({
34+
required String senderEmail,
3335
required String recipientEmail,
3436
required String otpCode,
3537
required String templateId,
3638
}) async {
3739
try {
3840
await _emailClient.sendTransactionalEmail(
41+
senderEmail: senderEmail,
3942
recipientEmail: recipientEmail,
4043
templateId: templateId,
4144
templateData: {'otp_code': otpCode},

0 commit comments

Comments
 (0)