File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -23,11 +23,17 @@ class HtEmailInMemory implements HtEmailClient {
2323
2424 @override
2525 Future <void > sendTransactionalEmail ({
26+ required String senderEmail,
2627 required String recipientEmail,
2728 required String templateId,
2829 required Map <String , dynamic > templateData,
2930 }) async {
3031 // Simulate input validation as per the interface contract.
32+ if (! _emailRegExp.hasMatch (senderEmail)) {
33+ throw InvalidInputException (
34+ 'Invalid sender email format: $senderEmail ' ,
35+ );
36+ }
3137 if (! _emailRegExp.hasMatch (recipientEmail)) {
3238 throw InvalidInputException (
3339 'Invalid recipient email format: $recipientEmail ' ,
@@ -37,6 +43,7 @@ class HtEmailInMemory implements HtEmailClient {
3743 // Log the simulated email for debugging purposes.
3844 _log.info ('''
3945 --- 📧 Simulating Email Send 📧 ---
46+ Sender: $senderEmail
4047 Recipient: $recipientEmail
4148 Template ID: $templateId
4249 Template Data: $templateData
You can’t perform that action at this time.
0 commit comments