Custom email tracking not sending request when opened in Gmail - ruby-on-rails

I´m trying to develop a custom email tracking system for my Rails webapp following the pixel approach. If I understood it right, the idea is to insert a one pixel image with source to a url that process the request. In my case, when the request is process it sends a new notification email to me.
In the email body I have inserted:
<img src="localhost/api/to?trackId=<%= id %>" style="display: none"/>
When I open the email in web Gmail with Chrome, I see next code, but unfortunately nothing happens:
<img src="https://ci4.googleusercontent.com/proxy/ncea8tesMNBOixfbJrQ1VL458oukzkLaIlWW6RbqedZ9mkMjsfgeIAWa5EWXcX4HOi0vLwDmFg=s0-d-e1-ft#http://localhost/api/to?trackId=1435" style="display:none;outline:none;text-decoration:none;height:auto!important;border:0" class="CToWUd">
When I just type the url directly in my browser, like: http://localhost/api/to?trackId=1435 my server gets the request and process it perfectly.
I have read in some other posts that Gmail is proxing the image and this is not working anymore. However, I think there should be one approach if there are lots of mail tracking services.
Do I have a mistake in my code, or should I try another approach?

Google replaces all images with copies in their cache. This copy cannot be retrieved from your localhost obviously.

Related

Update message and Outlook Web caching?

When using the Update message API from Microsoft Graph (https://developer.microsoft.com/en-us/graph/docs/api-reference/v1.0/api/message_update) to update the body of an email, although the API succeeds and you can see in the preview of the email in the Outlook web interface that the new body has been applied you cannot see the new body in the full message until you completely refresh the page. It seems that the web interface downloads the preview and the full body of the message from different places. Any tips on how to make the Outlook web pick the new message without a refresh?
The API take the preview and the full body of the message from the same place. But we will not refresh the full page by default(Ajax). So we just see the preview content. We cannot do that without a refresh, but I think we maybe do it without significant refresh(ajax to replace page content too, still trying)

Typo3: FE Login with POST Request to external app server

I recently started getting into Typo3 but now I have to implement something for work and I have no clue where to start.
The requirements:
I have to add a separate page that can only be accessed by frontend
users. (so far no problem)
These frontend users should be able to login with the same password
as they got for their iOS app. (uh-oh)
The separate page should display data from the app. (less of an uh-oh
but connected to the previous point)
After talking to the developer of the app, he made a specific POST request that can be used for the webpage. I am also getting a json-file with the required data that I need to display upon successful login.
My question lies with the login. How do I go about implementing this? I use the extension felogin to provide the login form on the page.
The POST request is looking sort of like this:
https://domain.at/api/queryMediaItems. It needs user and password, declared as user and pwd. In the body there should be a json object with the language, e.g.:
{"language":"de-at"}
You need to implement a SSO (SingleSignOn) as your users need to identify against the iOS-app.
This might give you a concept.
You also can look inside the code of some extension

Console application using the YouTube Data API

I'm about to build a console application that needs access to the authenticated YouTube Data API. Calling the API's themselves is not a problem, I know quite well how to make and process HTTPS requests.
I've already gotten the API key and the Client ID. No problems there, either.
The problem is the authentication.
I've checked here: https://developers.google.com/youtube/v3/guides/authentication#installed-apps
On the "Installed applications" tab, in step two, it instructs on how to set up a url to call to do the authentication step. All good so far. But before programming anything, I thought I'd try and see what that url does in the browser.
Turns out it just displays a login prompt. Well how about that. That won't work in this kind of console application. The idea is, presumably, that the user is somehow shown this webpage and be instructed to login and allow access. Then, somehow, by some kind of magic perhaps, the access token is sent back to my console application.
Two things I'm not quite sure about:
1) How do I prompt for the username and/or password in the console app and send that to the authentication URL?
2) How would I get the access token back from it?
The biggest problem is that the API seems to require a browser... Which isn't there. My console application will (eventually) run unattended, so starting up a browser and displaying a webpage and doing nothing until it returns a code, is out of the question. I need to somehow supply the authentication page a username/password and get back the code right away.

Keeping Track of campaign, strange behaviour from gmail

I know question I am going to ask is not related to programming, but I dont know where to put this question so i am asking it here.
I am working on sending campaign to newslettersubscriber. I want to keep track of the email opened count to know the response from our customers. Technology I am using is ASP.NET MVC3 , SQL Server 2008. I have token in my email template(campaign) which is replaced by one specific url, which isDisplay images below image is downloaded.And method in my common controller is called and corresponding row is updated.
Now after this email is sent to customers. when i sent opened my own GMAIL inbox and opened this campaign. I inspected html element. but markup i saw was diffrent from my original url
Image
Is should <img src="http://www.mysite.com/common/EmailViewedNotificationHandler?id=30-E1663091-8849-442D-81C1-0DDE97771B55"
But interpreted as
<img src="https://ci5.googleusercontent.com/proxy/WnpVRMliHHhtbOu6y6GmZD4l4kVePPdRWR4BTNQY_OLeQ2IFJOJHwuvy2qThpWJUQBKpA7hmf09pkxDfnfQCszDDs2YHfIWd3iqGRMpsD6cNXO0UTLf4BN6Cbj43KfDkaCVrlwIZl-B0y8LlrWvjaheDRhd_f2ryjpib_c8f4K4=s0-d-e1-ft#http://www.mysite.com/common/EmailViewedNotificationHandler?id=30-E1663091-8849-442D-81C1-0DDE97771B55"/>
This was the case for my first campaign but with second campaign event this url wasnt there it was only <img>
By Gmail
Any Solutions
Thanks In Advance
This is new for Gmail but it pretty much screws you over for tracking an email campaign in Gmail. Google now caches images in emails and displays the cached versions to users (the URL you're seeing is to a Google caching server). This means that you will likely receive only one and exactly one request for each image in each email you send since Gmail will have to make a request to your server for the initial caching.
But to be honest you couldn't count on Gmail for accurate campaign tracking anyway since they moved to the "smart inbox" system that is supposed to automatically prioritize your inbox. I'm not sure what else Google has done to anger email marketers but the ones I work with really don't like Gmail.

iOS app creates email...is there a way to not have a copy of it in the sent folder

My app creates an email that can have sensitive data in it (depending on the users perspective). Is there a way on the iphone's email client not save a copy in the Sent folder.
And in the same way, if the user choses they can send it via text..is there a way to not have it be in the Message streams.
I'm thinking there is not but I'd love confirmation of this if possible. I've been scouring but can't seem to tell if it's possible.
Thanks.
I'll break this into two parts:
Not putting a copy of a sent message in the sent folder:
There's no easy way to do this since you don't have access to a user's mail. You could have the user enter their email service's IMAP details and write your own mail sending implementation that then goes and deletes the sent message from the server, but it's possible that mail clients would keep a local copy regardless of what happens on the server if they grab the message before you delete it. Regardless, this is a really terrible user experience (having the user enter IMAP details, not using the built in mail composer) and it'd be difficult to write (and you would need to be insanely careful about deleting something from a user's mailbox, and you'd have to ask them if it's okay to do so).
Not showing a text message in a Messages app conversation stream:
There's actually a way to do this. Text messages can be sent to users via a specially formatted email address that's different for every cell service provider. For example, to send a text to a Verizon subscriber it'd be 5551239876#vtext.com. For this solution to work you'd need to send the message using some sort of automatically generated email address that you retrieve from a mail server you've created, and then you'd need to implement your own SMTP mailer on the device. Of course, a user can always request text message transcripts from their cell service provider (and some have easy access online) and there's no way around that.
How sensitive is this information? Email and text message aren't very secure protocols. You may want to consider alternative methods that provide encryption and authentication mechanisms.
No its not possible if you are using the built in mailer in iOS. Something you could do if you wanted to get around this would be to make a customer mailer, send the information to a server and send off the mail through code but this is quite a bit more work.

Resources