how to send a public link in mail

cancel
Showing results for 
Search instead for 
Did you mean: 
abiram2008raj
Member II

how to send a public link in mail

For example 

In mail we can send a below code to view the uploaded files with login. 

<p>Click this link to view the item:<br />
<br />${document.shareUrl}</p> 

We need a same attribute for public link. what is the shortcode "${document.shareUrl}" like this for Public file sharing link.

Please send a property of Public link. 

Kindly do the needful 

10 Replies
angelborroy
Alfresco Employee

Re: how to send a public link in mail

You need to put the value in the template. 

This is a sample by using JavaScript: Send e-mail from a template in Alfresco | Open Source Technical Blog 

Hyland Developer Evangelist
abiram2008raj
Member II

Re: how to send a public link in mail

Oliver BeirneXena Lappin

Share link - ${document.shareUrl}  we have this property 

Public Link - ? ? ?                           what is the property Please share 

Angel Borroy

angelborroy
Alfresco Employee

Re: how to send a public link in mail

There is no pre-defined property. You have to inject it by yourself as it's explained at the link I gave you.

Hyland Developer Evangelist
abiram2008raj
Member II

Re: how to send a public link in mail

Angel BorroyOliver BeirneXena Lappin

How to get the value of public link . In that link you create a mail. 

i have to get or pass the value of Public link. once i get the public link. i can create a mail. 

my problem is how to get the public link . . Kindly help 

angelborroy
Alfresco Employee

Re: how to send a public link in mail

Using Alfresco JavaScript API, you can write something similar to

var link = "http://localhost:8080/share/s/" + document.properties["qshare:sharedId"];
Hyland Developer Evangelist
abiram2008raj
Member II

Re: how to send a public link in mail

Angel BorroyXena LappinOliver Beirne

I want get the value  like this of any thing 

${document.shareUrl}   ----   ${document.publicUrl} some thing related this . 

Please help because we are not much aware of java 

angelborroy
Alfresco Employee

Re: how to send a public link in mail

Again...

Please, read the link I gave you:

Send e-mail from a template in Alfresco | Open Source Technical Blog 

In that blog post it's explained how to inject custom variables in email templates.

Again...

There is no ${document.publicUrl} by default, you have to set it by using JavaScript or Java. You cannot get the value by any other mean.

Hyland Developer Evangelist
abiram2008raj
Member II

Re: how to send a public link in mail

if i call the link like this $(publicURL) can i get the value. Please let me know . 

abiram2008raj
Member II

Re: how to send a public link in mail

Angel Borroy

if i call the link like this $(publicURL) can i get the value. Please let me know . Tell the variable name of public share