Slack Upload Email using API - upload

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.

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.

email in inbox Iphone app don't match with format

I send a email with sendGrid Api V3.
When a receive email from web. It work format
But when i open mail with default app on iphone. It wrong format:
I use Sendgrid Api v3 to send mail. Pls Someone can help me solve this error...
It looks like you lost formatting... it almost seems like you're looking at the text version. I would recommend testing the email in something like Litmus, which will let you see the email on different platforms.
Also try looking at the email in different clients (Gmail, Outlook, etc), and see if maybe you're just sending a text version only.
I really like this gem https://github.com/ryanb/letter_opener
When you're in local development, it will open the email in a browser window when it sends, so you can actually see what you're sending as well.

Upload file using slackbot as Direct message

I am created slack bot, is there is any possible way send reply message as file? (I need to sent some file as reply message based on input). I tried using api file.upload it make the file as private not able access using url, but if i am upload to channel using sampe api, file is public, is there any way to send direct message as file by bot)
Yes. You can share a file directly and privately with a user by sharing it in a direct message channel with the user.
Just put the {user-id} of the user you want to share the file with in the channels parameter of the files.upload API method and you are all set.
Your slack app will need the files:write:user scope. This also works with bots.
Example for user with ID U12345678:
curl -F content="Hello" -F channels=U12345678 -F token=xoxp-your-token-here https://slack.com/api/files.upload

Objective-C: Saving a sent email as a file

I would like to compose and send an email programmatically via an iOS app. On a successful send, I want to be able to store a copy of the sent email as a file so that I can integrate and store the email in a document/contact management system.
Does anyone know if this is possible and if so, which libraries are available? I have had a look at some of the SMTP libraries on GitHUb but cannot find how to save emails as a file
You can not save an email from email composer in iOS.
All you need to do is, You can generate email format file manually with code (as you already have all the data of email) and save it if you get success flag in delegate method when user send an email.

How to correctly indent original mails with ActionMailer/Mailgun

I'm currently receiving emails with Mailgun API and I'd like to automatically respond to any received email.
I've already defined the header params In-Reply-To and References in the autorespond emails and that kinda does the job, but I'd also like to indent/quote original text below my reply for other mail clients (like Mail.app on the iPhone) which don't stack emails correctly.
Any suggestions/tips on how I can accomplish that?
Thanks.

Resources