I am looking at the c# .Net libraries from sendgrid to send emails from my applications. I can only see a DeliverAsync method within Web and I don't see any Deliver method as shown in some examples..
1) if I want to know the result of that email(success/Failed/smtp status codes), How and where do I get that information? Is there any result object?
2) if I want to track the status of the email later like whether it sent to spam or user opened it How can I do that. DO they have any tracking number/id for the email which I can get from the result object and use it later to get status through their API?
I am new to using Sendgrid libraries. So any help is appreciated.
Thanks
There's no result object in the sending of the message, since that can take some time.
The best way is to leverage the Event Webhook, so that you can receive POSTs with JSON data about your messages. you can even leverage unique_args to positively relate events to a particular message.
Depending on what you want to do, you might want to try a templating API, like sendwithus. They'll integrate with SendGrid events for you and give a UI showing events and status of every email.
Related
I am new to StackOverflow, struggling to find a solution to my problem: I am trying to synchornize my asp.net app with the calendly api.
So far, I have managed to create a webhook subscription and I saw that the webhooks are being registered to https://calendly.com/api/v1/hooks/ and I was able to acces a specific webhook using its id (I used Postman to see all this, as I am currently local developing). I am having a lot of trouble since I am not able to understand what call should I make in order to get the webhooks and be able to use their data in my app.
https://developer.calendly.com/docs/sample-webhook-data
This is what I should be parsing, according to Calendly documentation.
I want to get data such as the emails of those participing into the event, also the date and status of the event. How can I do this?
From your question, it seems to me there might be a lack of conceptual understanding of what webhooks are.
As you mention, you had already subscribed to be notified if some event happens in Calendly (I assume invitee.created event).
This means, that
when this event actually happens on Calendly (you may need to make a test scheduling request in the Calendly UI), the notification about this event is sent to the URL you had registered (subscribed).
This registered URL has to be reachable for the notification call. In other words, if the URL is in your local environment (and you mentioned it is so), it's impossible for the notification to reach the registered (subscribed) destination. So this might be the issue you're experiencing.
You need to read incoming raw data. In my script, with PHP, I do it using file_get_contents('php://input')
You need to parse the data. With PHP I use json_decode($inputData). In your language you've got to use whatever tools you have for JSON parsing.
Basically, that's it. In my case, I read invitee email using $parsedData->payload->invitee->email.
Hope it helps.
I work with Gmail API, I found how to get a list of message ids and, in a loop, how to get specific properties of those emails separately.
Problem is to make request for each email is very slow, mainly when my client have hundreds of mails ordered in hundreds labels...
I've tried to find a method to get one specific property at the first request, when I use UsersResource.MessagesResource.ListRequest, but unsuccessfully...
For information, the property I want to get is "Message-ID" (not the id given by Google).
I did it once with Exchange Web Service, that why I'm looking to do it with Gmail API, if possible.
Thanks for answers in advance.
PS: Excuse my English, which is not my native language.
When you make your request to the API you can send an optional parameter called fields it will allow you to return a partial response and just the fields that you are intrested in
Documentation
https://www.googleapis.com/demo/v1?key=YOUR-API-KEY&fields=kind,items(title,characteristics/length)
I tried with google but no success, what i want to do is to make sms poll/quiz type of thing where user can send sms to "7766" and get response like "Welcome to ABC. reply with 1 to get you new question, 2 with help, and 3 to view your result " . this will be a a two way communication and on sending any sms will cost $10 .
Here are my question:
How can i do that?
Do i need to ask sim [provider for tht Number (7766)
This should work from some specific country only.
I need to charge amount on entering the QUIZ.
Well as new to this, i dont see any starting point from wher i can start. I need reference or some one already did that or like this thn kindly share that.
Perhaps you can have an ecommerce solution on your website (Paypal for example) and then once your user has paid, they have access to a portion of your site that uses an HTTP SMS API. An example of a provider of such a service would be http://www.bulksms.co.uk/w/eapi-sms-gateway.htm
These APIs allow you to send messages, receive delivery reports and receive replies (amongst other things).
It's quite a wide-ranging question though.
I am trying to find a solution that can handle messaging via email.
When a user creates a message in my application, an email is sent using subject #4857474.
Then, the email recipient can reply, without changing the subject, and my application would know what message it used, based on the #id in the subject.
Now, I do not want to implement such service because its rather complex. What I am looking for is a service that provides this, and just calls my web services for a request when a new message has arrived.
Is there such thing? Thanks!
In the smtp standard there are two header fields that can be used for this: message-id and in-reply-to.
Assign a unique message id when you send the mail, then inspect the in-reply-to field in messages you receive. Since the field is hidden from user input, there is no risk that the user messes with it.
I don't think there is a default component you could use. Also it wouldn't be a very complex flow i think.
Just read out the subject and trigger your app?
Is email a must or can you also use a webbased reply form? Then you could use just a database.
Edit:
Read email from C# http://www.codeproject.com/KB/IP/despop3client.aspx
Create a thread that runs for ever and reads out the mailbox. If a email matches your criteria (subject) then trigger your webservice.
I have a piece of monitoring software I am writing which needs to retrieve e-mails sent to an address for a certain day so that I can filter them by a regex in the subject or body. I don't need to retrieve the entire message, only the subject and body for all messages on a given day so that I can evaluate them with a regular expression for a token.
I looked at EAGetMail as a solution, but their implementation doesn't do what I need to to do. I can only get all information on mail, which only has the size and index. I would need it by subject, but even then I don't want to get everything in inbox. If I went with this solution I have to get all mail, and then retrieve each mail message individually to evaluate the subject and body. This is not ideal.
I also looked at OpenPop.Net, but it too does not have a targeted retrieval for today's messages only.
Can I even do what I want without looping through every single email on the server until I find a match? What is the best way to accomplish what I am trying to do? Am I going to have to build a custom web request to get the data I want? Also, I looked at Chilkat, but I am looking for a free solution, even if it means building the http request myself.
dont know if this helps you at all because it is vb.net however, if you combine with the other link it may help.
http://www.codeproject.com/KB/smart/EmailClient.aspx