RPA Core assignment: sending emails work through Workfusion studio but not control tower

<?xml version="1.0" encoding="UTF-8"?>
<config xmlns="http://web-harvest.sourceforge.net/schema/1.0/config" scriptlang="groovy">
<mail smtp-host="smtp.gmail.com"
  smtp-port="587"
  type="text"
  from="myemail@gmail.com"
  to="tuk.tuk.rpa@gmail.com"
  subject="RPA Core Training - Link to Business Process Results (Final Assingment)"
  charset="UTF-8"
  username="myemail@gmail.com"
  password="mypassword"
  security="tsl">
<template>
	${applicationHost}/workfusion/secure/business-process/edit/${item.getWrappedObject().getRun().getRootRunUuid()}
</template>  
</mail>
<export include-original-data="true">  	  	
</export>
</config>

This code when I run in the studio it runs and sends an email. However I tried in the control tower and it doesn’t work. I have already enabled less secure apps in gmail and approved the critical security alert I received from running this code. The code runs in the studio and I can see the emails were sent in my email sent folder so I do not think the problem is on the email side of things.

If anyone else have encountered the same problem please let me know how you fixed it. Thanks!