Push mail API for receiving mails - push-notification

I would like to know if there is an API which can receive push notifications for an email client.
Use Case: I would like the server to send my web service notifications on new email. I would not like to poll the server. I would like the server to send notification (PUSH) to the web application.
Also, what are the (if any) mail servers that support this kind of API?

Check out Cloudmailin which is a SAS that will do REST post back to your server

Related

Method for the push notification messages to reach the website user

In terms of websites, How does push notification get displayed ?
Does service workers periodically check the web server for new data and display as notification
or
Server sends message to user based on user IP address or other network details ? in this case website background does not need to check server periodically.

How would a chat application using HTTP look like?

So a chat application with Websockets, user A can send any number of messages to the user B and user B can any number of messages to the user A. What if the chat application is built using HTTP protocol, would it work the same way but with more latency?
If you were to use the HTTP protocol instead of TCP or UDP it would look a little different. With the HTTP protocol you cannot simply send a packet from user A directly to user B, you would first need something like a RESTful web API to send the requests to. So it would look something like this:
user A sends POST request to the web API with the message as the request body
the web API receives and stores the message
user B sends a GET request to the web API requesting to see the stored message
the web API receives the get request and returns the message to user B
this might have a little more latency than using other protocols. You can also add authentication in your API to verify the users before accepting or returning any messages.

Send mail via SendGrid to Outlook was always failing

I am a newbie in using SendGrid. I have a web application that send a mail to users after the successful registration. I am using send grid to send mails.
It works fine when I try to send Google email accounts. But when I send mails to Outlook email addresses, it always failed to deliver emails.
I checked the SendGrid 'Activity' section it shows like below.
You might need to setup domain authentication. This link should be a good place to start: https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/
Outlook might have different firewall rules blocking incoming (potentially malicious) emails while GMail might have a different set of them.

What options are there for a push server in order to send notifications to a service worker

I'm building a web app that has a service worker, which displays a notification when a message is sent. I've been using the Web Push API example (https://web-push-codelab.glitch.me/) as it's backend.
But I'm not clear on how notifications are sent to a service worker. Do I need to create a backend service that pushes out notifications, and as part of the registration of the service worker, I have to subscribe to an endpoint that the backend server provides.
Also do I need a 3rd party service that sends out the notification? That my backend service talks to?
I know how to setup a service worker, but not how to create the service that the Push Manager subscribes to.

Can Azure Web App receive email SMTP, and send email (SendGrid)?

Presently I use VisualBasic .NET web app (with SendGrid for email) running on my Azure server VM. I receives SMTP email from public Internet directly to the VM ok. It send email using SendGrid addon ok.
Will this all work if I switch to Azure Web App (formerly Web Site)?
Should my web app code work as-is without modification, even the SendGrid calls?
Outgoing email using SendGrid will not be a problem at all. Using it on App Service is common and you probably don't need to change any code at all.
Inbound may require changes depending on what you're doing. Are you simply polling a mailbox somewhere else and then doing something with the messages? If so, you could convert that to a scheduled WebJob poll at a specific interval and act on incoming messages.
If you're running an SMTP server on your VM to receive mail, then that's something you cannot easily replicate on App Service.

Resources