How to display Protected Images in Email Messages - image

I am creating a web app using Laravel 5.3 where only authorised users can view the images in that app. For example, lets says something like Facebook where only friends can view the user's avatar if the permission is set like that. When the image is viewed from the app, the api check the auth credentials, check the permission and displays the user image accordingly. However, my question is, if I am sending a notification emails to users, how can I display the protected images in email messages? For example, if I add the img url like this in html email:
<img src="http://example.com/api/image/useravatarname.jpg" />
the above will fail since it doesnt have a token in it. In these cases, how are protected emails displayed in emails? How does website like Facebook does it?
These are the methods I have thought of but not happy with:
1) Embed Image Binary Data: I don't know if adding the image binary data will work in html emails. Even if it does, it doesn't seem like a good method when sending emails.
2) Image URL Parameter: I was thinking maybe to add some parameters like the user's email address ?xyz#gmail.com to the img source url and then from the api locate the user with that email id and verify if they have the permission to view the image. But the problem with it is, some people can view the image by adding the email id parameter easily by guessing.
3) Facebook Notification Email: When I checked the facebook notification email, I see the avatars in the email are displayed something like this and I have no idea what they are doing here:
https://ci5.googleusercontent.com/proxy/lkjasdlkjsaldjalsjdlasjdlkjasdljsaldjasldlasdljqljaldjsaldjsaldlsajdlsajdlkasjdkljasldkjaslkdjsakldjsaljdlsajdlasjdla#https://scontent-syd2-1.xx.fbcdn.net/v/t1.0-1/p100x100/ljsdlkjsdljsdljsd_23232323_23232_n.jpg?oh=askaslkalsjalsjalksjalkjsas&oe=58C270EEE
Is there another way?

Related

Laravel mail embedded image not showing for some people

I have a problem with Laravel mail image embedding or rather its combination with Outlook. I'm sending a mail containing embedded profile image of user who created certain activity. For some reason some people however don't see the image only big X icon:
I have tried attaching the image to the mail
The mail is coming from same domain
I was able to see the image even when I sent testing mail to my personal gmail account
My settings are the same as the person who is not able to see the image
EDIT:
image tag: <img class="img" src="cid:generated_id#swift.generated">

Parse.com confirmation email change

My app uses a parse.com backend. I'm having problems changing the confirmation sent from parse when users sign up. they get an email that asks them to confirm their email address but instead of it being from parse I want to change it to an email that has my own branding on it. Any thoughts?
I'm pretty sure you can do it on the dashboard. Go to parse.com, select your app, then settings, then email. There you'll find the templates.

HTML Emails wIth Images - getting weird results in gmail

I am sending a multipart email through codeigniter using Amazon simple email service SMTP. I am providing a plain text version of the email along with the HTML version and google show the following [image: ][image:][image:} on all the emails. Is there any way to get around this? I have seen this in any email I have received from another company so I figure I am doing something wrong. Any ideas?
To be clear the first few elements in the email are images, however this is no different than I have seen in many emails I receive as newsletters from other companies.
Let me know if you would like more detail, I don't really know were to keep for this one as any search or debugging has made any changes.

Xcode 4.5 -iOS- Read email/update text field inside app

Is it possible to read the content of lets say the last email in a specific email inbox? I´m developing an app for a company and I would like for anyone to be able to send an email to a specific address, and then the content of that email would be visible in a text field inside the app. But for that to work the app will have to be able to have access to a specific email. I bet there are other ways of updating a textfield inside an app but this would make it so easy for everyone to be able to update this news feed.
Thanks!
Third-party apps have no access to the system Mail app’s database. If you want to access the contents of an email, you’ll need to connect to that server and retrieve its mail yourself.

MvcMailer view in browser

I am using MvcMailer with my website to send html emails.
seems good, but im just wondering how i can view the created emails in a browser.
eg in some newsletters they say "view this email in a browser", so i am just wondering how I can do that with MvcMailer.
The easiest way is to put a link in the email back to your site, and then create a controller/action that uses the same view, and builds a model the same as the one you used when creating the email.
If all the data you need is in the database, you may be able to just pass a key in the querystring (note: if the mail contains potentially sensitive information, make sure the url is tamper-proof), otherwise you might need to pass in more data to allow you to reconstruct the same view that you did when generating the email.

Resources