Page 1 of 1

Mail send with OAuth2.0 - opaque pickup

Posted: Sun Mar 09, 2025 3:28 pm
by joaodaffonsojr
Hi !

I´m having problem to use Mail send with OAuth2.0 and opaque dataset.
With the standard mail tool in Switch works fine, I have an HTML with some Switch variables that are sent ok.

Mail send with OAuth2.0 don´t get this variables it sends only the code of it.

Any suggestions ?

thanks in advance

João

Re: Mail send with OAuth2.0 - opaque pickup

Posted: Tue Mar 11, 2025 10:51 am
by freddyp
Which variables are you using?

The new versions of mail apps using OAuth2.0 are written in NodeJS and unfortunately we cannot evaluate all Switch variables in that environment (yet). Private data works, so a workaround is to define all the information you need as private data keys and in the HTML template you only use such variables. Concretely speaking, on the folder element in front of mail send you define "Set job private data" as for example:
emailfrom=[Connection.Email]

and in the HTML template you use [Job.PrivateData:Key="emailfrom"]

Re: Mail send with OAuth2.0 - opaque pickup

Posted: Tue Mar 11, 2025 11:21 pm
by joaodaffonsojr
Thank you Freddy !

I´ll try right way !


freddyp wrote: Tue Mar 11, 2025 10:51 am Which variables are you using?

The new versions of mail apps using OAuth2.0 are written in NodeJS and unfortunately we cannot evaluate all Switch variables in that environment (yet). Private data works, so a workaround is to define all the information you need as private data keys and in the HTML template you only use such variables. Concretely speaking, on the folder element in front of mail send you define "Set job private data" as for example:
emailfrom=[Connection.Email]

and in the HTML template you use [Job.PrivateData:Key="emailfrom"]