How to track an gmail's email through an api attach to an src tag of image? - grails

I want to track the email when somebody opens the image attach to that email. So i have been rendering an image byte through an api attach to the image tag rendered in email template. But whwn i am opening the email the src tag embeds the google proxy server address to my api address and not sending to my backend. background-image:url('https://ci6.googleusercontent.com/proxy/RMM_t4IFMpVLwbzLttQJroXN8EPE8atXTqU703UgLhhhytAO-_AvbFUjVyDXKGgcExvdyZtB7aBMSNHphT8n7rVxNMvsij1BsL4SCw=s0-d-e1-ft#https://resources.sparkwork.io/renderImage'). In this my actual api is https://resources.sparkwork.io/renderImage .So how can i solve this problem. Because when i am attaching some image url them its working and showing that image but when i am using my backend api then call is not coming to my backend to render that byte code of image. So any solution to solve this problem ?

Related

Custom email tracking not sending request when opened in Gmail

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.

Slack Upload Email using API

I´m trying to upload an email (I have the html code) to slack.
I know that there is a possiblity to upload files using a slack email adress, but in my case I cannot use it.
I used the slack api method files.upload for this, but the files only appear as code lines and not as html content.
Yes, you can upload emails to Slack, but only as plain text files using files.upload. That however works pretty well.
To upload a plain text file with files.upload sent the file contents as string in content (this must be sent via a POST) and set filetype to text.

Generating a PDF with an image continuously falls with a request timeout

Generating a PDF using TCPDF in PrestaShop 1.6 with an image ends with a request timeout while requesting the same image inside the server.
The PDF is generating fine for the ones without the image.
We are generating E-ticket as PDF for the customers who purchased our ticket and we send them as email attachment. Also, we have given them the possibility to generate the E-ticket PDF when they click on the button on their order history. But that too is not getting generated.

send files to MUC Rooms using XMPP Framework

How to send files to MUC Rooms using XMPP Framework?
I have searched a lot about this.
Using the SI method i get error 503 service unavailable or Wrong JID ,but how to pass a resource for groupchat ?
I had used the method to transfer image using string data but now its not up to my needs. I read that we can upload file to server and send the link instead. I'm using openfire server.
If anybody has some insight about this please share. Any help is appreciated. Thanks !
Yes you can upload your image to a server and send the link.
The flow goes like this:
You need to send a thumbnail image using xmpp (and the link of the original image stored on server), like you must be sending the entire image now in your application.
When the user clicks on the thumbnail image, you can download the original image from the server using that link.

Slack image url asks for login

I have integrated slack in my custom application using the API provided by Slack.
I am able to fetch the post from Slack and able to display it in my application. I am able to fetch the image that was uploaded with the post (Few days back) but today when I added a post with the image. The image is not being displayed in the application, when I am trying to access the image URL in the browser it is asking for Authentication.
I am accessing the slack rest API to fetch the post from slack. from the response I am taking the "thumb_64" parameter from the "file" object.
I am able to access the below image URL, this image was uploaded on 2016-01-11
https://files.slack.com/files-tmb/T0F8RH7U7-F0J505EG1-33434fadf3/screenshot_from_2015-12-28_15_23_39_160.png
But I am not able to access the below mentioned URL ,this image is uploaded on 2016-02-16
https://files.slack.com/files-tmb/T0F8RH7U7-F0MHZL70Q-d740ed784b/configration_160.png
Thanks & Regards,
Have you seen the update where #slackapi announced about accessing files using the Web API?
Essentially, you now need to provide authentication to access file assets, by specifying an HTTP Authorization header with an OAuth token that has the correct scopes to access that kind of data for a team.
For example, you'd send a header like this with your GET request:
GET https://files.slack.com/files-tmb/T0F8RH7U7-F0MHZL70Q-d740ed784b/configration_160.png
Authorization: Bearer YOUR_VALID_ACCESS_TOKEN_HERE
The File type documentation goes into further detail.

Resources