Git Product home page Git Product logo

notification-provider's Introduction

Notification Provider

Integration Build

Notification Provider is an implementation to send Email Notifications using the Graph APIs/Direct Send, and supports sending more than 10k emails in a day. This service has robust retry mechanisms and telemetry hooks to ensure proper tracking of email notifications. The library is extensible, providing the users the option to use Graph/DirectSend as Notification Providers to send the email Notifications and Table Storage or CosmosDB to store the Notification History and Templates.

Benefits of Notification Provider

  1. Uses Asynchronous processing of emails
  2. Accepts email in batches
  3. Extendible solution for your choice of storage and Notification Providers
  4. Already supports GraphAPI/DirectSend as NotificationProviders
  5. Already supports Azure Table Storage(recommended) and Cosmos DB as storage for email tracking
  6. Uses Application Insights for logging, log level can be configured
  7. Have different endpoints for resend/getting history/sending a single email/sending emails in batches etc
  8. Supports Attachments/Templates and more to come.
  9. Differnt API Endpoints for Template management

Please find further details in the WIKI here.

Deploy to Azure

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.

When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

Trademarks

This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow Microsoft's Trademark & Brand Guidelines. Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party's policies.

notification-provider's People

Contributors

deepika791 avatar dependabot[bot] avatar harshitagarwal93 avatar microsoft-github-operations[bot] avatar microsoftopensource avatar nli8n avatar patrickcode avatar reddaiahnethi avatar sanjayprajap avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

notification-provider's Issues

Unable to send attachments

All emails with attachments are failing with error ""

To Reproduce
Steps to reproduce the behavior:
Send any email with attachment

[
  {
    "notifyType": 0,
    "priority": 2,
    "from": "[email protected]",
    "to": "[email protected]",
    "subject": "Testing email attchment fix from local [DO NOT REPLY]",
    "body": "<h1>Hi</h1>",
    "sensitivity": 0,
    "footer": "string",
    "attachments": [
      {
        "fileName": "ta-2.txt",
        "fileBase64": "VGhpcyBpcyBhIHRlc3QgYXR0YWNobWVudA==",
        "isInline": false
      }
    ]
  }
]

The mails are failing with the below error:
Invalid OData type specified: "Microsoft.OutlookServices.FileAttachment"

Expected behavior
Emails should be sent with the proper attachment

Additional context
As per official Graph documentation the OData type being sent from Notification provider is incorect

Valid AppId validation is not available for the API authorization

Describe the bug
When a API call is made, only audiences is being validated against valid-audiences that are configured but not app ids against ValidAppIds of ApplicationAccounts setting

To Reproduce
1.Generate bearer token by providing valid audience as resource and use any AAD clientId-clientSecret combination that wasn't configured in ValidAppIds setting of ApplicationAccounts section in keyvault
2. Provide that token while calling queue end point then the call would be successful instead of failing with 403 error.

Expected behavior
The API call should be forbidden by throwing 403 error when any invalid client ids are used to generate the token

Move Report api from Service to Handler

Describe the bug
Currently the reports apis are exposed from service endpoint, which should be from handler.

To Reproduce
Steps to reproduce the behavior:
Go to service swagger endpoint, the reports apis are present there

Expected behavior
This should be exposed from hadler api.

Issue while sending email notification using templates without templatedata

Describe the bug
There is issue while sending email notification using templates without templatedata( placeholder). The issue is with both types of templates (xslt and text).

To Reproduce
Steps to reproduce the behavior:

  1. Create a template ( can use existing one as well)
  2. try sending email using the template with templatedata as null
  3. it will throw error

Expected behavior
The email using template ( with no templatedata) should be sent successfully.

App configuration no getting refreshed after the changing the sentinel key value in azure app configuration.

Describe the bug
The azure app configurations changes is getting pushed to application while the application is still running. We need to restart application to get the configuration changes in effect.

To Reproduce
Steps to reproduce the behavior:

  1. Start you application (notification service/notification handler /notification processor)
  2. Make changes in some config values and then changes value against ForceRefresh key
  3. New configuration changes should be used in application.
  4. Still uses the old configuration changes.

Expected behavior
The new configuration changes should be used in applications with restarting all the applications.

Screenshots
If applicable, add screenshots to help explain your problem.

Additional context
Add any other context about the problem here.

Allow non-blocking meeting invites

PROBLEM
Meeting invites going from this service are blocking. This service is sued for blocking the calendars of consultants for new assignments, which may span for weeks.

SOLUTION
Allow non-blocking invites to be be sent from the service. Graph allows the status of an meeting invite to be set as 'Free'.

Email send failure because of recipients email contains spaces between email Ids list

Describe the bug
Whenever there is an space between two email ids in cc/bcc/to list, it fails while send email notification with following error if we pass cc list as "[email protected]; [email protected]" (check space ).
"At least one recipient is not valid., Recipient ' [email protected]' is not resolved. All recipients must be resolved before a message can be submitted."

To Reproduce
Steps to reproduce the behavior:

  1. Send notification using notificaiton handler api with cc list like "[email protected]; [email protected]".
  2. wait for it being processed by notification service.
  3. it will fail with exception mentioned above

Expected behavior
The email validation should be done so that such issue should popup early.

Priority/Importance of Meeting Invite using Direct Send is not working

Describe the bug
when we provide the priority of meeting invite as the input to queue/send request, it is not sending the invites with the expected priority

To Reproduce
what ever the priority we set in the request input, the invite is received with normal priority

Expected behavior
The priority is as follows : High:0, low:1, normal:2 when priority is set to those values, the email should be delivered corresponding to the given priority.

Screenshots
If applicable, add screenshots to help explain your problem.

Additional context
Add any other context about the problem here.

Priority/Importance of email notification feature is not working

Describe the bug
when we set the priority of email in the email queue/send input request, it is not sending the emails with the expected priority

To Reproduce
set the priority to low using priority: 0, then direct send email would be delivered using high importance and graph would be delivered using normal importance.

Expected behavior
The priority is as follows : High:0, low:1, normal:2 when priority is set to those values, the email should be delivered corresponding to the given priority.

Screenshots
If applicable, add screenshots to help explain your problem.

Additional context
Add any other context about the problem here.

Getting Toast notification even though all notification settings are disabled

We have turned "off" all the notification from notification settings (generic settings + app specific also), but still we are getting toast notifications. PF screenshot below:
image

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'Notification and actions' settings
  2. Turn off "Get notification from app and other senders"
  3. Launch application (which shows toast notification)

Expected behavior
Toast notification should not come

Actual behavior
Able to see toast notification

Additional context
Add any other context about the problem here.

Status of emails remain as "Queued" if Service Account password is incorrect

Describe the bug
The status of the email doesn't get updated to 'Failed' when mail fails due to incorrect Service Account password

To Reproduce

  1. Set an incorrect password for the service account
  2. Queue an email
  3. Mail won't be sent but status will be shown as 'Queued'

Expected behavior
The status of the mail must be updated to 'Failed'

TemplateData is null for v1/report/notificationMessage

Describe the bug
v1/report/notificationMessage API is failing with templateData is being null.

To Reproduce
Steps to reproduce the behavior:
make a call to v1/report/notificationMessage end point with notificationId which was used to send the email using templates.

Expected behavior
The notificationMessage would return body with template and template data details

Screenshots
If applicable, add screenshots to help explain your problem.

Additional context
Add any other context about the problem here.

[Meeting Invite] 24 time format is not working

Describe the bug
The end time and start time of the meeting is accepting input in 24 hours format, but the actual meeting is set in 12-hour format. Incorrect time is set of the meeting invites, or graph is rejecting the input in some cases

To Reproduce
Send a meeting invite with start as 2021-08-18T13:00:00 and end as 2021-08-18T14:00:00. The meeting with get set at 1:00 AM to 2:00 AM UTC

Expected behavior
Meeting should be set from 1:00 PM to 2:00 PM

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.