why my emails from my domain email id are sent to users as promotion? - google-schemas

When Users receives email from my domain specific email id he/she receives it in promotion tab.
while it should be delivered in primary email tab of inbox.How it can be done.

The way emails are assigned to a specific tab depends on multiple criteria, including but not limited to the following:
Gmail uses a variety of signals to classify messages into the different categories.
Users are in control of their inboxes - they can disable some or all tabs, they can choose to move particular messages or senders into a particular category manually.
Gmail learns from user corrections, so over time any misclassifications, as users who receive the mail perceive them, will get automatically put into the right category.
It is recommended for commercial mail senders to split promotional mail from notifications/transactional mail - put those in different messages and send then from different email addresses.

Related

How to track Twilio sms message relationships in my application

I am dev'ing a project where someone creates an event, and a group of people get an sms message inviting them. I want the recipient to be able to rsvp via sms. So if they respond "yes" I want to know what event_id they are responding to0.
I am passing a:
"statusCallback" => "https://cbd5-67-183-175-137.ngrok.io/receive-note/12345"
(not a real event id, just testing)
I don't care about the message status at this point, just if a response comes in. What parameter can I pass to the create message call that will allow me to dynamically track what event this invite was for? Is it a webhook or some kind of grouping?
Twilio developer evangelist here.
There is no concept of replying to a specific message in SMS, messages are just chronological.
The statusCallback URL for an SMS will only report on the status of the message you are sending to the end user, from queuing the message to be sent all the way through to delivery.
When a user sends an SMS to your Twilio number it triggers the incoming message webhook.
The incoming message webhook has no connection to an outbound message at all. So you will have to work out what message you think the user is replying to. A simple way to do this is to assume that they are replying to the last message you sent to them or the last event invite.
You are probably already considering what might happen if a user is sent invites to more than one event at the same time. How can you distinguish which event they are replying about. You have a couple of options here.
You can only ever send one SMS about an invite at a time, up until a timeout of sorts. That way, when a user replies you can always assume it's about the latest message.
Or, you can send invite message from different Twilio numbers. If you then store the outbound number with the invite you can look up replies based on the user's number and the number they replied to and calculate which invite they are responding to. To achieve this, you need more than one Twilio number, but you should only need as many numbers as the maximum estimated number of events a user might be invited to at one time.
Finally, you could ask the user to include an event ID or similar in their reply which you can then parse out, but this is likely to be a difficult ask of users.
This exists in SendGrid and is very useful. I don't understand how it's not implemented in Twilio.

Graph Subscription Email Resource For All Emails

I am working on a system that allows the user to log their email conversation to our CRM.
This uses MS Graph subscriptions that create a subscription to a given email conversation. We then process the Graph notifications. When creating the subscriptions we set the resource like this:
/users/{id}/mailFolders('inbox')/messages
/users/{id}/mailFolders('sentItems')/messages
This gives us notifications for when the user sends or receives an email on that conversation thread.
This works great, but we discovered that if the user has a rule set up to send items with a certain subject to a different folder, when receiving a new email that they have subscribed to, we don't receive a notification.
I am guessing that this is due to us subscribing to the inbox and sentitems but not the custom folder that they have their rule directed to.
I noticed that there is also a way to set the resource as:
/users/{id}/messages
Can someone tell me whether this will set up the subscription to receive emails from all folders?
If this is the case, we wouldn't want to receive notification for example when the user deletes and email.
Additionally, we currently create 2 separate subscriptions. Is there a way to create a subscription for more than 1 resource (e.g.inbox and sentitems) under the same subscription?
thanks
The resource path users/{id}/messages is just a shortcut to the one with the inbox mark folder. A subscription to it will only notify you of emails going to that folder.
A subscription only allows you to subscribe to one resource at a time. You could use JSON batching to create/maintain multiple subscriptions in the same call, but that would only be beneficial to reduce the number of http requests.
You'll need to subscribe to each folder you want to get notified for, a request to users/{id}/mailFolders should give you a list of the folders for the inbox.

Is there something similar to an extension for SMS?

The Scenario:
I have a exclusive mobile chat app. Users can communicate with preselected and know groups of people that don't use the app via an SMS bridge. For that purpose currently each user get's her/his own virtual phone number. SMS for an specific user are sent and received via this virtual number. The SMS are distribute to each member of the group she/he communicates with.
The Problem:
A single receiver can be member of more then one group. In this case, when a receiver (R) responds to an SMS message from the user (U), it is not unambiguously clear wich group the response belongs to. Because the only available information is the sender (R) number and receiver (U) number (virtual) we can not be certain wich of the groups that R belongs to the message came from.
Solution Idea:
The only way I can see to get around this problem is to have U use a different phone number to communicate with each group. Assigning each user many phone phone numbers for that case isn't scalable at all because of the costs. But I also would at least initially like to avoid the complexities of managing a vast number pool that automatically assign numbers to individual communications.
Question:
Is there any way at all to add additional digits to the senders virtual number when sending an SMS? So that when he/she replies to that number, the context is transmitted back to the server
Twilio developer evangelist here.
I'm afraid there isn't anything within SMS that does what you need. You were right when you supposed that U should have a different phone number to communicate with each group.
It's not all bad though, because you can set up which users are in a particular group, you can reuse that number for a completely different group. Here's a good article on scaling number pools for group messaging that might help.

Whatsapp no-API alternative?

I created a website that connects people together in the jewelry industry. What I would like to do is to give the ability to notify a shop owner when someone wants to contact them to ask about a product.
E.g. a visitor sees their product, and clicks on "contact seller".
Of course I could send an email, or connect through an SMS provider. But emails are not that immediate or interactive, and SMS costs money.
Ideally I would want to send a Whatsapp on the receiving end, but they don't provide an API for that.
Is there an alternative that I can use to notify the shop that someone is interested in buying one of their products, so they can go into the website / email? I just need to alert them, on their mobile device, and I prefer not to create my own app for just that.

SMS payments platform for subscriptions?

On WhitePages.com they have a mechanism in place that facilitates payment by entering your telephone number. After you enter your number, you get an SMS that instructs you to enter "GO" in order to complete the transaction. Following that reply with the purchase you've made, you get another message suggesting that for a certain monthly fee you can use the service in an unlimited fashion. I had not seen anything with quite those dynamics before and I'm curious of what service(s) one would use to construct a payment system like this for a Ruby on Rails app?
I am particularly interested in a platform that allows this kind of payment from as many countries as possible as I currently use Twilio for SMS messaging on another app.
Without knowing the full details of what WhitePages.com offer it sounds like they're using Premium SMS as a method of collecting payment from a mobile.
After you've entered your telephone number, they'll send you a text with the originator set to a premium shortcode (rather than from a long number). The reply you send back to the premium shortcode is deemed your acceptance to be charged more than your standard network SMS rate. The amount of the charge can vary but should be made obvious to subscribers before they are charged. This Mobile-Originated reply text (MO) is what causes the charge to be taken from your mobile telephone number bill.
Premium subscription services can then subsequently generate further charges whilst the user is still subscribed by sending messages from the premium shortcode. The act of receiving these messages causes a charge to be applied to your mobile telephone bill. These are deemed Mobile-Terminated texts (MT).
Premium SMS is not a simple solution for collecting payment for a number of reasons.
You often only receive a small percentage of what the user is being charged on their bill as the mobile networks keep a cut for offering the service.
As this relies on premium shortcodes you may have to accept you'll have different numbers for each country you want to operate in as you'll have to organise premium shortcodes in each country.
There's different regulations regarding Premium services that you need to be aware of in each country. For example, users need to be able to unsubscribe / opt-out of premium services once subscribed so premium services often have to comply with receiving 'STOP' and 'STOP ALL' messages from users.
As far as I know, Twilio doesn't support premium shortcodes at this time. There are other SMS Gateways which do support premium SMS but you won't get a single solution to fit any country you wish to operate in. Interacting with this kind of system is usually no more complex than sending and receiving normal SMS so the task of creating this with a Ruby on Rails app should be no more complex.
Normal SMS is pretty much globally universal. Premium SMS is an additional country specific feature.

Resources