%HOMEPATH% as link when sending emails - email

Is it possible to send dynamic links via email? We store a lot of our files in DropBox and everyone has a dynamic file location due to their Home Path.
i.e.
<a href='%HOMEPATH%\DropBox Folder\Folder\File.xlsx'> Click Here </a>

The simple answer is no; there is no portable and reliable way to specify relative paths which depend on the recipient's local file system in HTML without the recipient's active cooperation.

Related

How can I make the images in the email template to show in every client?

The images embedded in the body of a Visualforce email template don't show in all the clients.
I am not sure where to start. I've tried to set the tag to <apex:image/> and <img />.
Tried to use URLFOR($Resource.Static) in the value attribute.
Tried to copy/paste the image server link.
I expect that the images in the body show in every client.
So far all the images are replaced by the alt attributes or just a blue border.
alt's might be there because client is not trusting SF and you need to explicitly allow downloading images, asking your recipients to add you to safe senders list etc.
But that's not all. Static resources are served from generic domain. There's nothing really tying them to given org (even if it has MyDomain enabled). They rely on your cookies for redirect to right org's resources and don't work well in email templates or VF pages set to renderAs="pdf".
You should use old-school Documents (if you're in Lightning UI - flip back to Classic), upload your stuff there, make sure "externally available image" checkbox is ticked...
Or in Files I think you can set deliveries, build the direct download URL too that should work OK (look for something with "shepherd" in URL, I know it sounds stupid)

How to Include image in email using sails email hook

Sails version: 0.12.14
sails-hook-email: 0.12.1
I am trying to send image in the email so that I can show in the email, and below is the code,
Note: I don't want to send it as an attachment, but want to show in the html.ejs page itself (i.e. in the email itself).
views/emailTemplates/forgotPassword/html.ejs
<p>Dear <%=recipientName%>,</p>
<br/>
<img src="/images/img1.png" width="300">
But it is not visible in the mail.
So how to include the images from assets/images folder to the above html.ejs file and make them visible in the mail that we send.
Please help me.
If your app is available on the internet, you can do that just by giving the making the src attribute absolute instead of relative. Something like this:
<img src="http://mywebsite.com/images/img1.png" width="300">
If your app is just on localhost or not online, then this won't work. The only solution then is to "embed" them image, which some email clients will display as attachments.
Note that some clients may show a "blocked remote content / click to allow remote content" message before they show your image properly.

Different index files for different directories on Google Cloud Storage, possible?

Problem: Planning to have my Jekyll-generated static site served from Google Cloud Storage, but need to serve feeds from example.com/feed/ for backwards compatibility with WordPress.
Possible solution: Say the static feed file (index.xml) is located at example.com/feed/index.xml. Then if it's possible to set a different index file for a directory itself (apart from what's set for the bucket e.g. index.html), then people would be able to access my feed from example.com/feed/.
But is this possible? If not, is there an alternative I'd be missing?
You could potentially create an object in the example.com bucket with the name /feed/. That's a bit awkward to think about, and because of the way gsutil works you'd have to do it via the API manually, but it would allow you to serve a feed from example.com/feed/.
Alternately, you could simply name your xml content /feed/index.html. If all of your users are indeed visiting example.com/feed/, then being able to name the file index.xml is not entirely relevant. The only special thing you'd need to do is make sure you set the right content type for the /feed/index.html object.
Another thing to keep in mind here is that the feed itself should be linked from your main index page with a link like this:
<link rel="alternate" type="application/rss+xml" title="My Awesome Feed" href="http://example.com/path/to/feed.xml" />
That gives you the ability to name your feed sanely, and your users can point their feed readers at http://example.com/ directly -- the reader should be able to follow the link to the feed itself. That won't help you if you have established readership that expects a wordpress style feed, but you could steer new people in the right direction and deprecate the weird wordpress style after a while.

Newsletter link tracking

I was working on a newsletter system, it's done now and it works fine. Today I was talking with a client about an upgrade for the system that does the following ->
"Automatic link tracking: View who
opened your email and what links they
clicked on."
Now, I have an idea on how to do this to add #id variable from the user query string on each link and then add a counter on each site to see who opened the link. BUT, is it possible to do this somehow else (without the counter on each link)? And how is it possible to track who opened your mail??? I saw a couple of newsletter system websites that say they can allegedly do this...
Thank you for your time!
The only way to track who opens your emails that I can think of is to use the query string trick with the images embedded in your email. This approach is obviously fragile since viewing of inline images can be turned of in most email clients.
As was mentioned; it is not possible to track everyone who opened the email. But you can track who clicked on a specific link. The method you mentioned with the #id variable will work - but instead of embedding the actual ID in the link, I would recommend encrypting that data and not sending the actual user id in the email.
To get the users who actually opened the newsletter, you can insert a 1x1 pixel image into the email as hidden content. That pixel would come from www.myserver.com/tracker.gif?foo=bar.
Then you would look at your web server log or log this request in a database so that you can track the ones who really opened the newsletter.

hidden folders in Internet

very often in Internet I see links like this:
www.abcde.com/~main/material/hello
and this part ~main/material/hello is grey, if I remove hello I receive access forbidden, can somebody explain, what is this system, and is it possible receive access?
Directory listing is disallowed on www.abcde.com/~main/material/, but you have access to it's content.
They've configured the web server to only allow access to certain areas. You won't be able to receive access to it.
Depends on the web server. On Apache this can be done with
Options -Indexes
what do you mean it is grey? the link text on a page? That can be any colour that the page owner wants, but I don't remember seeing a grey link.
What happens if you type www.abcde.com/~main/material/hello directly into the browser's address window?
If you remove "hello" and receive access forbidden it is because there is no public access to www.abcde.com/~main/materia - give up, you will never access that without a password.
The tilde (~) is *nix convention for a user's home directory. Using it in the URL tells an appropriately-configured web server to look in a directory in the user's home directory for the files to show via the web server.