Picture of Danilo
Registered 2 years 124 days
Danilo Tuesday, 28 March 2023, 06:50 AM
SmtpClient send emails from JS
Hello,

I'm trying to send emails from a JS service, I implemented it exactly as in the SDK example innovaphone SDK - SmtpClient (https://sdk.innovaphone.com/13r3/doc/javascript/SmtpClient.htm#Example-basic), but I get the following error:

ReferenceError: identifier 'SmtpClient' undefined

What was left to do?
Thanks
Picture of Matthias Schertler (innovaphone)
Moderator Registered 11 years 359 days
Matthias Schertler (innovaphone) Tuesday, 4 April 2023, 10:16 AM
Re: SmtpClient send emails from JS
Hi Danilo,

the SmtpClient was added in the following Service Releases

13r2 Service Release 20 (136401)
13r3 Service Release 2 (137786)

What SDK version do you use?

BR
Matthias
Picture of Danilo
Registered 2 years 124 days
Danilo Wednesday, 5 April 2023, 11:31 PM
Re: SmtpClient send emails from JS
Hi Matthias,


I am using v13r2 136390. mixed

Can you explain how I could send an email from my JS service?
Is it possible?

Thanks in advance.
Danilo
Picture of Matthias Schertler (innovaphone)
Moderator Registered 11 years 359 days
Matthias Schertler (innovaphone) Thursday, 6 April 2023, 08:47 AM
Re: SmtpClient send emails from JS
Hello Danilo,

please update the SDK in your project to the latest version. (See: https://sdk.innovaphone.com/13r3/doc/gettingstarted.htm#menu_items)

After that the SmtpClient object should be available to your app service.

Here you can find the documentation of the library: https://sdk.innovaphone.com/13r3/doc/javascript/SmtpClient.htm

BR
Matthias
Picture of Danilo
Registered 2 years 124 days
Danilo Saturday, 8 April 2023, 02:38 AM
Re: SmtpClient send emails from JS
Hi Matthias,

Thanks for the tip.

Now I still receive an error from authentication, but I think it's because I'm tried to connect on SMTP of the Google.

After the end of support of less secure apps from google, how I can authenticate and send emails from it? Is it possible?

Thanks.
Picture of Matthias Schertler (innovaphone)
Moderator Registered 11 years 359 days
Matthias Schertler (innovaphone) Tuesday, 11 April 2023, 11:54 AM
1 of 1 users consider this post helpful
Re: SmtpClient send emails from JS
Hi Danilo,

yes, GMail stopped supporting authentication using passwords. So the SMTP client from the SDK is not compatible with GMail. But any other mail server that supports password authentication can be used.

BR
Matthias
Picture of Edgar 4724
Registered 5 years 38 days
Edgar 4724 Tuesday, 25 April 2023, 05:29 AM in response to Danilo
1 of 1 users consider this post helpful
Re: SmtpClient send emails from JS
Hi Danilo!

Have you tried to activate 3rd party App Passwords in Google Account?
I'm using Google SMTP to send e-mails on Innovaphone after configured this feature on Google Account. I found the information in this link:

https://support.google.com/mail/answer/185833?hl=en#zippy=

BR,
Edgar
← You can define your color theme preference here