Set up Alfresco 5.2 to use your gmail account

Posted on Thursday, February 2, 2017


I am going to go over how to use you gmail account with Alfresco share.  So that Alfreso can send out emails like invites etc…

But remember gmail has limits I have a paid gmail account and I think its limited to 1000 outgoing emails a day?  I think a free one is limited to 500.   More than enough for testing or even for a small company.





Edit alfresco-global.properties


Go to the base folder for your tomcat.
This may be /opt/alfresco-community/tomcat

In my case I use a custom location at /10x13/apps/alfresco/tomcat

Once you are there open up the shared/classes/alfresco-properties folder for editing.



  >  cd /10x13/apps/alfresco/tomcat/
  >  sudo vi shared/classes/alfresco-global.properties


Before I dive into this you can go to http://docs.alfresco.com/5.2/concepts/email-outboundsmtp-props.html [1] to see some of the setting options you have



First thing you need to do is to change the notification.email.siteinvite to true.


### E-mail site invitation setting ###
notification.email.siteinvite=true








Now add the following to connect it to a gmail account


#
# Outbound Email Configuration
#-------------
mail.host=smtp.gmail.com
mail.port=465
mail.protocol=smtps
mail.username=yourname@example.com
mail.password=yourpassword
mail.smtp.timeout=30000
# New Properties
mail.smtps.starttls.enable=true
mail.smtps.auth=true



Replace mail.username with your actual gmail account and replace mail.password with your actual password



Save it.





Restart Alfresco


I installed Alfresco with the basic binary installer see http://www.whiteboardcoder.com/2017/01/this-document-is-going-to-go-over.html [2]  which includes a basic init script that I am going to use to restart alfresco.  This will probably restart postgres and everything else the alfresco binary installer installed… which is a bit of overkill (really you just need to restart tomcat)



  >  sudo service alfresco stop
  >  sudo service alfresco start


I had issues getting stop and start to work correctly.  So I did a reboot of the entire system that seemed to get it back up.


  >  sudo reboot





I like to tail the tomcat log to see when it is back up


  >  cd /10x13/apps/alfresco/tomcat/
  >  tail -f logs/catalina.out






Oops I have an issue







WARN  [org.alfresco.wcm.client.util.impl.GuestSessionFactoryImpl] WQS unable to connect to repository: Unauthorized


Need to get that fixed before I can move on.
… Looks like I can open up alfresco share just fine but this error is annoying



Because I installed the optional WebQuickstart I need to set a few settings in the alfresco-global.properties file




wcmqs.api.alfresco=http://127.0.0.1:8080/alfresco
wcmqs.api.user=admin
wcmqs.api.password=admin




Then reboot the system.



  >  sudo reboot




I don't think I really need this tool.  Here is an overview of what it is https://www.youtube.com/watch?v=vfQrRzt4HIw [4]

So I am going to remove the war file for it and remove the settings from alfresco-global.properties and reboot.



  >  cd /10x13/apps/alfresco
  >  cd tomcat/webapps





Remove these and reboot


  > sudo rm wcmqs.war
  > sudo rm -r wcmqs
  >  sudo reboot



(I guess I should not have installed that when I installed alfresco the first time … )




Test


OK let me test it out

 



Go to admin tools




 

Go to Users and click New User




Fill out the informations, use a real email address you control. And click create user.







If you do not already have a share site create one.  
From the Sites menu click Create Site.







Create a collaboration site make it private and click Create.






Go to the site.






Click the add user icon on the upper right.










Search for the user you want to add to this site and click select







Select a Role for this new user








Click add User.





Now that user should get an invite email.















There is my email.  The images are not showing up because they reference my internal server address for example (http://127.0.0.1:8080/share/res/components/site-finder/images/site-64.png


There you go its successfully using your Gmail account .





References


[1]  Alfresco Outbound SMTP configuration properties      
       Visited 1/2017
[2]  Alfresco basic install  
       Visited 1/2017
[3]  how to fix 'WQS unable to connect to repository: Unauthorized' error?
       Visited 1/2017
[4]  Alfresco Web Quick Start - Introduction and Installation
       Visited 1/2017
[5]  User roles and permissions
       Visited 1/2017



No comments:

Post a Comment