Modifying the XMPP Presence Stanza - xmpp

In XMPP user can send subscription request to another user to add in roster, I am easily doing this even working perfectly if user is offline server automatically dispatch this presence when user come online.
But I need to add a custom tag to this presence, it works till user is online, if user is offline the server send the regular presence without my custom tag when user arrives online.
How to achieve this.

It looks like the XMPP server you are using does not store the extended info of the presence. According to RFC6121 3.1.3.4 the server must store this info:
http://xmpp.org/rfcs/rfc6121.html#sub-request-inbound

Related

Send emails from flutter application without expenses or smtp server and without opening the gmail app

As the title says, I would like to know if there is any way to send emails without having to use an external service, that charges me for sending the messages, or having to use an SMTP server in which each user has to be registered.
I have also seen pages like email.js but I don't want to have to pay for that if there is a possibility to do it on my own. It is also not useful for me to open the Gmail or messaging application of the device itself since I already know how to do that and it is not what I want.
For better understanding, I will give an example of what I want to do.
What I want is that from my application the user writes a message and from there that email message is sent to several different users from a list, without having to log in or anything, since the emails will be sent from my own email account. gmail that I have specifically created for the application.
I have seen the smtp server but from the information that I have seen that server implies that I have to log in to be able to have the token and that is not what I want because I want that once I configure everything there is no need to do anything else that people receive your messages and that's it.
I don't know if this is possible but I hope someone can help me.
Sending emails without your user logging in would require you to have either the credentials stored in the app (which is unsafe) or use a custom backend server that will host all the credentials that cannot be extracted. I would advise going with the backend route because it is easier to setup and your application will simply perform a HTTP request to get it done.
From the documentation of the mailer package, you can implement the server method pretty easily and get it moving. You will have to find a free web hosting service to deploy to.
There would really be otherwise no other way to get what you desire for virtually free.

sendgrid email via X-SMTP

I am trying to figure out how can I make it possible to send an email from my
application to Sendgrid and have it come back.
I want to use coldfusion to send an email using X-SMTP API. I found a documentation
online here but still wondering if there's any documentation available other
than the web API one?
http://thehatrack.net/blog/integrating-sendgrid-with-your-coldfusion-application/
SendGrid's Event Webhook is the only way to get email reads on an individual basis. This will POST an event to your server every time an email is read (among several other events).
The only "pull" based solution to get individual email events from SendGrid is the bounces endpoint, which will tell you when an email bounces (and is certainly not read), but nothing else.
If you want to retrieve individual read events from SendGrid, you'll need to connect the Event Webhook to an external service like Keen.io, and then leveraging their API to get individual events.

How to provide tenants in SaaS application with their #companyName.application.com specific email services?

In our SaaS application each company (tenant) is given their custom domain like companyName.ourapp.com
We would like to provide some email services like:
Ability to send and receive email notifications from info#companyName.ourapp.com and similar addresses
Ability to create new email accounts in clients' subdamains at runtime, programmatically, when needed. For example we would have separate emails created for each "opening" so that emails sent to this address would be parsed info would be extracted
Similar tasks
For now I just don't even know on where to look and how this could possibly work.
As far as I understand email it should be some kind of custom mail server (SMTP) serving all sub-domains and having API we can use to send emails, list and retrieve messages etc.
Please suggest how it may work and is there any components out there we can use to implement this.
There are three options for this.
Create an email server and programatically configure it to accept or deny the specific accounts. Then use cron to poll via pop3 or imap and download the messages for the account. You can then send them on for the customer or handle them in your web app.
Create a script that is fired by the email server as it receives each email. The script can then handle what to do with the email as it's received.
Use a third party to receive the email via HTTP Post at your app. Using CloudMailin for example would allow you to create a custom authorization filter that would call your app in realtime and determine if the given account exists and messages should be accepted for it.
I wrote a blog post for Rails about receiving incoming email, however the principals would apply to any programming language and framework.

Smack API can we listen to the subscription requests of all the users from XMPP?

I have a collaboration product for which I am adding a chat feature
I want to notify users (through email or some other means) whenever they get subscription requests
How can I achieve it through smack? My understanding is that you have to login to XMPP server using your credentials and can register a listener for presence events of the logged in user.
But what I want is to listen to all the presence subscription requests. Is it possible?
Pretty sure you will have to write a server side module for this kind of functionality. The spec doesn't provide this ability so you would have to add it as a custom capability in the server.

Is it possible to add a contact to buddy list with out subscribe request?

I have developed MSN, Yahoo and Facebook Instant Messaging using ejabberd, strophe and transports. Every time when legacy user register him self with his credentials to transport, he has to authorize bunch of subscribe requests. Is it possible to avoid this process. I am wondering how meebo adding contacts to respective buddy lists without asking any subscribe requests.
Thanks,
Sathi
I imagine Meebo automatically confirms the subscription requests without the user knowing, since they can (correctly) infer this is the user's intent when interfacing with a social network that does not have asynchronous connections.
Just have your own code automatically respond to ask='subscribe' requests from users behind the gateway to achieve the same thing.