How to handle mailer daemon responses with JavaMail API and exchange server? - jakarta-mail

We have a mailing service, where we send notifications to users. But when a user's email is invalid , the the server responds with a mailer daemon response or bounce mail. I want to catch these responses and log them into a database.
Is this possible using JavaMail API along with exchange mail server.
Thanks in advance.


How do I send email from a react app using SMTP

i have a webform written in react - i would like an email sent to an admin when someone submits something from it.
I had a look at emailjs which looked promising, but it looks like it was attempting to execute the email send at the browser side... duh!
How do I send the email from the server side (i.e. from the webserver) so that I may use the local smtp server to relay the email?
I'd spin up a node.js app and use nodemailer (
Also, beware that sending mail from 'localhost' is likely to get your messages caught in spam. I highly recommend using a service like (free) to delivery your messages so you don't have to worry about SPF records, DKIM records and IP Address "warmup".

Receive slack bot messages via requests to external URL

Is it possible to receive direct messages on behalf of a slack bot via POST requests to a certain domain?
I want to have an endpoint in Google App Engine that receives incoming direct messages from Slack via POST requests, and posts messages back via the API. Is it possible?
You can use the new Events API. Create a bot, subscribe to events, and set your endpoint as the callback URL
You just need to set up an "outgoing webhook"in slack and point it to whatever endpoint you need on your GAE server. In order to respond just use an "incoming webhook" to receive the answer.

About google app gmail api

I was trying to send emails to my client from my application after few sent mails all mails bounces back with a message saying "You have reached a limit for sending mail. Your message was not sent." And one more thing when i see my developer console gmail api it still showing 0% usage.what is this issue? is this a bug or something else?
There's an extra limit on sending because it's a vector for abuse--it doesn't show up in the developers console but it's the same as sending via SMTP or the web interface.
This seems to have a good overview:

XMPP sendMessage does not send the message

I am using the XMPPservice's sendMessage method
to send a message to google mail but the message
can not be sent without any error log.
A common error source is that the receiver first has to accept an invite from the sender. Only then messages will be relayed to the receiver. Have you sent an invite and was it accepted?
If the Gmail recipient is using Google Apps (e.g. Google Apps for Business), the recipient domain must publish SRV records in their DNS to allow routing of the XMPP packets to the Gmail Chat backend. The vast majority of Google Apps domains will not likely have SRV records configured.
If the recipient is a / account, then (as #schuppe suggest) the most likely cause of this issue is due to the fact that the recipient did not accept the invite from the sender.

Receive mails through a port and extract body and headers

I am trying to build a proxy server in between my application and my smtp server. So when my application sends an email to some email id, my proxy server should catch it and change its "TO" address to my id and then send it to smtp server so that I'll get that message in my mail. This is a different case compared to reading messages from an inbox. I dont know how to distinguish each separate mail and get mail headers and body from each mail.
Any help would be greatly appreciated. Thanks in advance!
You should take a general look at JavaMail API and playing with it before asking for complete solutions.
Some other resources:
jGuru: Fundamentals of the JavaMail API
the JavaMail API - FAQ