I am sending email using sendgrid.
Are there any options in sendgrid to get email analytics (open/bounced/replied emails) for each users email address?
I've done this two ways before:
1) Use SendGrid's Event API to collect and aggregate the data yourself.
2) Use a service like sendwithus on top of your SendGrid account, which will collect your SendGrid analytics for you and provide analytics by recipient, template, segment, etc. They also provide an API and Ruby client.
Once you're logged into SendGrid, navigate to the Stats Dashboard.
You should then be able to see something like this:
I hope this helps.
Yes, There are option available for this, to get the status of individual emails sent via sendgrid.
Send a unique arguments with every email you sent and then later on you can get status of these emails with reference to unique argument.
Some more explanation of your question will help us a-lot to describe you the best possible solution.
i have recently done this work, so if you explain the whole scenario, i will come up with the solution.
There are two ways to get hold of this data:
Use the SendGrid Event Webhook to get near realtime information about every event for every email you send via SendGrid. It works by issuing a POST request to a URL that you specify.
You can then store all this data for consumption later on and it's by far the most granular information you can get. Key/Value stores like Redis are a good option for this, but if you want a simple option to get going, check out the SendGrid EventKit to get up and running quickly.
Or:
Grab the data via the Stats API. This endpoint allows you to grab the numbers you need in a multitude of ways for both main and subuser accounts.
Based on your question, you should investigate the Event Webhook as it will give you most clarity on what happens with each email you send.
You can now use Thinbox to get analytics from Sendgrid, Mailgun, Mandrill, or just by bcc'ing an email address they give you. It's basically like EventKit but for the rest of the ESPs too.
Related
Is there any way to find whether the email is legitimate or not. I am using mandrill and some emails were hard bounced so, is there a way where mandrill can send a response to my rails application that email was hard bounced. Or is there any other way to find that email actually exists or not through other medium. I saw a gem https://github.com/kamilc/email_verifier but there were some issues so I am not sure to use it or not.
Thanks in advance for help
I think you are looking for Mandrill's webhooks
The idea is that you set up an endpoint to receive event notifications (including bounces) from Mandrill.
One best solution is to implement webhooks which returns all status of emails sent. The webhook can be customised to recieve what response you can recieve including sent and delivery also. It also helps in tracking open and click rates which could be later used for filtering privileged users.
https://mandrillapp.com/api/docs/webhooks.html
I am using free mandrill account and sending email via using template and API
When i send message it returns okay it is sent as status
However even after several days there is still no smtp events at mandrill interface and the email is not arrived
So i am 100% suree mandrill is ghosting accounts
Or there is something else that i do not know?
Thank you for answers
PS: At the beginning emails were arriving but after some point no smtp events and no emails ever arrived even though no error message parsed. Also when i send to non existing email no bounce message returned.
Also account reputation is 61 : excellent
Yes i believe mandrill certainly ghosting accounts
After trying with several accounts i am now sure of it
Even if you send to non existing gmail email, it says delivered in its interface
However it should have displayed hard bounced
So beware of their free service. I believe this is not an ethical way of working. People would think that their emails are arriving however they are ghosted and mandrill did not even try to send them and yet displays delivered
Have you check it on Mandrill account? It shows all the report at outbound tag. The reason is, a queued response in the Mandrill API is not the same as a queued response from a recipient server.
When you send a message through Mandrill, you first relay it to Mandrill, Mandrill processes it, and then Mandrill relays it to the recipient server. This all happens quite quickly, but the two relaying steps are separate and distinct. The KB article you've linked to is providing additional details on that last step, relaying to recipient servers, not a queued status for the Mandrill API.
There are a number of reasons the Mandrill API may respond with queued including if you've added attachments or if you're sending to a bunch of recipients in a single API call.
Without seeing the actual API call that's being made, it's hard to say why you're getting a queued response. But if you're using the sample messages/send API call, you'll want to remove all of the optional parameters that you're not actually setting. For example, the sample has fake attachments, and a subaccount specified. The attachment will cause the call to be processed async. The subaccount probably doesn't exist, and would then cause the call to fail. So if that's the case, try removing all of those optional params. If not, please provide the API call you're making with sensitive data redacted (API key, actual email addresses).
I use one sendgrid account in multiple projects, and use a same send email per project. Now I want to fetch the "Bounces" and "Invalid Emails" entries for specify project, can I get them with the same send mail?
SendGrid does not store the from address for consumption with these API's so what you are looking to do unfortunately isn't possible this way.
Two options I recommend looking into as an alternative are:
1) Use subusers. This will allow you to have separate accounts under the same parent account. You'd have to change your credentials and query for the bounces and invalid emails separately.
2) Use categories and the event webhook. SendGrid will send you a post request containing the event type and the category you added to the email.
there is also unique arugments option to send with emails. use this option as a name or id of the project. then later fetch status of these emails via this unique arguments.
I recently done this work, let me know if you need any help.
in github when a user sends you a message two things happen. You get a "new Message" on your github dashboard and you receive an email.
if you reply to that email it triggers a new Github message internally... so the users can actually have a full conversation through their email client without going into github even though Github is managing it all.
I know Malgun/Sendgrid have apis to manage receiving of emails (they send a POST request to your app when an email is received) but I need a little more info on how to do it... how exactly can I set up my app so that when a user receives a message they can just hit reply on their favorite email client while still maintaining track of that conversation. (they can still check their messaging history through my site)
Does anyone have an idea how exactly they do it?
Please help.
How this is implemented really depends on how you can handle incoming messages. If you're able to receive your emails as a POST to your application, then the email is really no different to a user sending the message on your site, you just need to parse the From: header from the email, and look up the user, and strip the fluff out of the email.
If you're writing your own code to handle the emails (eg. that polls a mailbox), then you could just POST them over to your app in the same way, or parse them up and POST more structured data.
Once you have the data, it's easy to construct a message and write it to your DB (and fire off email notification to the user, remembering to set the Reply-To: or From: headers so your script gets the replies). Most of these kind of messaging systems don't keep track of conversations/threads, but just store a string subject (and use "Re: ...") to keep things simple, though you could obviously add this if you're feeling ambitious!
If you're doing this, you should be security in mind - malicious users may POST to your email script, and email headers can easily be forged. Spammers will also use any possible scripts they can find to relay mail through other peoples servers.
When using 'mail' command to send email to a gmail user, the email goes through fine. When sending an email using a Rails app, the email is sent to the spam folder for the gmail user. Can someone help me think through this?
Emails landing in SPAM can happen due to many reasons:
Wrong Mail Server setup: Checkout here on how to setup
Email content: Content of the email can also invite SPAM. Sites like SpamCheck helps to check whether the content of the email is ok.
As mentioned by #Noli above, using services like Sendgrid, Critsend etc for sending out emails, chances of landing them in Inbox will be more. You can use them as relay servers from Postfix. But the first two steps are anyway necessary.
Use Mailchimp if you want to sent emails to many people, for eg: for sending out newsletters, marketing emails etc.
Mail deliverabillty is extraordinarily hard to get right. You should consider leaving this to the specialists like Sendgrid or Mailchimp, and not spend tooooo much development time thinking about it
Another thing to check is that if this is a new server, you may need to set up Domain Keys to authenticate to Gmail. This happend to me and I was able to get my mail removed from the spam folder by following these:
https://help.ubuntu.com/community/Postfix/DomainKeys
https://help.ubuntu.com/community/Postfix/DKIM