Hi im learning how to send and email in Akka with scala. I've been trying to use Alpakka Google Common with Gcloud service account credential and Google Api Client to send the email. I have come across several errors with the data types of the credentials that Gmail.Builder() is expecting.
I've been following https://doc.akka.io/docs/alpakka/current/google-common.html and created an Environment Variable called GOOGLE_APPLICATION_CREDENTIALS and obtained with:
val credentials = GoogleCredentials.getApplicationDefault()
and for the service i was trying to do something like this:
val service = new Gmail.Builder(httpTransport, jsonFactory, credentials) .setApplicationName(validateAndGetStringConfig(baseConfig, "appName")) .build()
1.I don't know if this is the best and efficient way to send and email in the akka framework 2.It is possible to use GoogleCredentials as Credentiales expected by Builder method?
Im using scala 2.13.5, akka 2.6.19, google common 6.0.1 and google-api-client 2.2.0