Has anyone had recent success using *web/email with a gmail account.
All my attempts end with an ERROR 23 authentication problem.
Does my application need to be pre-authorized in gmail? If so how?
I'm using v22 and in order to use a Gmail account for sending emails from PxPlus, you need follow these steps as outlined in the manual:
https://manual.pvxplus.com/?Google%20Workspace%20Objects/App%20Setup.htm
Then run this code:
0010 LET clientid$="Client ID from Google"
0020 LET clientsecret$="Client secret from Google"
0030 LET oAuth2=NEW("*obj/oauth2")
0040 LET oAuth2'Authorization_URL$="https://accounts.google.com/o/oauth2/auth"
0050 LET oAuth2'Token_URL$="https://oauth2.googleapis.com/token"
0060 LET oAuth2'client_id$=clientid$
0070 LET oAuth2'client_secret$=clientsecret$
0080 oAuth2'Enable_Certification("Message to appear in browser to inform you that access has been granted")
0090 WAIT 1
0100 LET url$=oAuth2'Get_Authorization_URL$("https://mail.google.com")
0110 SYSTEM_HELP url$
0120 INPUT "Press any key to continue after logging into account and allowing PxPlus access:",'CI',*; PRINT ""
0130 oAuth2'Get_Access_token()
0140 LET refreshToken$=oAuth2'Refresh_token$
0150 LET accessToken$=oAuth2'Access_token$
0160 DROP OBJECT oAuth2
0170 !
0180 CALL "*web/email","your_email@gmail.com","","eric@edias.com","","","Test GMAIL","This is a test - email from *web/email","","","smtp.gmail.com;465-secure;your_email@gmail.com;your_password",0,-1,"",0,ERROR$,"",savedfilename$,accessToken$