How to change pre-polpulated email subject and body of public link shared with gmail.

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

How to change pre-polpulated email subject and body of public link shared with gmail.

I am sharing the public link of an document using the share with gmail in alfresco 5.2. But some pre-populated subject and body is coming and it contains the name like Alfresco i want to change the name from alfresco to other name.

From which file this pre-populated subject and body is loading .And how to change the body and subject so that it load what we give in backend. In subject it is giving File Shared from Alfresco Content Services i want that to be changed as File Shared from MyOrganisation.

I am attaching images for better understanding the problemImage22.pngimg1.png

4 Replies
Advanced

Re: How to change pre-polpulated email subject and body of public link shared with gmail.

You can try to do following
1. create a custom-slingshot properties file under web-extension\messages folder in your custom-slingshot.properties file add following properties,you can modify it as you wish.

linkshare.action.email.label=Share by Email
linkshare.action.email.subject=File Shared from Alfresco Content Services
linkshare.action.email.body=File {1} shared from Alfresco Content Services, look at it here: {0}

2 create a custom-slingshot context file named custom-slingshot-application-context.xml and import the custom-slingshot properties file.

<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>
<beans>
  <bean id="org_alfresco_module_custom_propertyBootstrap" class="org.alfresco.i18n.ResourceBundleBootstrapComponent">
      <property name="resourceBundles">
         <list>
            <value>alfresco.web-extension.messages.custom-slingshot</value>
         </list>
      </property>
   </bean>   
</beans>


3 palce the custom-slingshot-application-context.xml file under web-extension folder and restart share

Senior Member II

Re: How to change pre-polpulated email subject and body of public link shared with gmail.

Hi,

Share side you need to override below mesage property.

linkshare.action.email.subject=File Shared from Alfresco
linkshare.action.email.body=File {1} shared from Alfresco, look at it here: {0}
Thanks & Regards,
Sanjay
Established Member II

Re: How to change pre-polpulated email subject and body of public link shared with gmail.

Thanks @sanjaybandhniya And suppose i want to send email by a specified email id can i in backend set the FROM parameter as i want.

 

Like i want anyone who want to share the document there personal email id is not use instead a common mail id is used .

Example: From to be set like:

From :Ak@gmail.com for all users.

What parameter i need to update.

Senior Member II

Re: How to change pre-polpulated email subject and body of public link shared with gmail.

Yes. You can set email id.

You need to override Social config of share-config.xml using share-config-custom.xml

 

 <config evaluator="string-compare" condition="Social">
      
      <quickshare>
         <url>{context}/s/{sharedId}</url>
      </quickshare>
      <linkshare>
         <action id="email" type="link" index="10">
            <param name="href">mailto:demo@xxx.com?subject={subject}&amp;body={body}</param>
            <param name="target">new</param>
         </action>
         <action id="facebook" type="link" index="20">
            <param name="href">https://www.facebook.com/sharer/sharer.php?u={shareUrl}&amp;t={message}</param>
            <param name="target">new</param>
         </action>
         <action id="twitter" type="link" index="30">
            <param name="href">https://twitter.com/intent/tweet?text={message}&amp;url={shareUrl}</param>
            <param name="target">new</param>
         </action>
         <action id="google-plus" type="link" index="40">
            <param name="href">https://plus.google.com/share?url={shareUrl}</param>
            <param name="target">new</param>
         </action>
      </linkshare>

   </config>
Thanks & Regards,
Sanjay