Opportunity to use printer function or apps on script or routine

You can give Sign in with app passwords - Gmail Help a go, it works

Everything is possible, but why would 587 or 465 mail ports be blocked…