Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Email Validation Issue for 'to' and 'cc' Fields in Alert-Report-Test #51

Open
mithunbharadwaj opened this issue Nov 20, 2023 · 0 comments
Assignees

Comments

@mithunbharadwaj
Copy link
Contributor

mithunbharadwaj commented Nov 20, 2023

Description

When sending an email using the Alert-Report-Test feature, the to field does not correctly validate the email address format. This results in a misleading "result": "OK" response even when the email address is just a string number, not a valid email.

Steps to Reproduce

1. Send an email with the following payload:
```json
{
  "to": ["1"],
  "cc": ["2"],
  "subject": "Alert-Report-Test",
  "body": {
    "template": "/Templates/Email/message.md",
    "params": {
      "name": "I am testing a md template"
    }
  }
}

Observe the response:

{
  "result": "OK"
}

Expected Behavior
The system should validate both to and cc fields to ensure they contain valid email addresses and return an error if the formats are incorrect.

Actual Behavior
The system returns a "result": "OK" even when the to and cc fields are not valid email addresses.

Possible Solution

  • Implement email format validation for both the to and cc fields in the email sending functionality.
  • Ensure that any non-valid email formats are caught and an appropriate error message is returned.
@mithunbharadwaj mithunbharadwaj changed the title Incorrect 'to' Field Format in Email JSON Object Email Validation Issue for 'to' and 'cc' Fields in Alert-Report-Test Nov 20, 2023
@ateska ateska assigned mithunbharadwaj and unassigned ateska Nov 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants