質問

I want to sent an email using PDI. I created an job and added the 'Mail' element. There are my parameters.

Server smtp.gmail.com
Port: 587
Use Authentication
User : mygmailusername
Pass : mygmailpass
Secure Con Type : TLS

When I run the job I get the error :Problem while sending message : javax.mail.AuthenticationFailedException

When I changed the port to 465 gmail rejected the message and sent an email to mygmailusername indicating unauthorised login attempt.

However I have changed the port for my BI server to 9090. I dont know if this is also a reason. Am assuming PDI is to communicate somehow with BI server if it is the BI server which is to send the email. How do I get this to work please ?

役に立ちましたか?

解決

I was finally able to get this to work. I changed my config to :

Server smtp.gmail.com
Port: 465
Use Authentication
User : mygmailusername
Pass : mygmailpass
Secure Con Type : SSL

Then I run the PDI job and this caused google to send a Suspicious sign-in prevented email to mygmailusername account. I opened the email and clicked on the http://support.google.com/mail?p=client_login. at the bottom of the email. This took me to a troubleshooting page.

Under the section Now, please follow the steps below to resolve the problem: I clicked on the link at the third option http://www.google.com/accounts/DisplayUnlockCaptcha and then clicked continue. Now it works perfectly now.

他のヒント

I guess you should try with:

Port 465 or 587
Secure Con Type SSL

If it doesn't work, check your GMail account for the SMTP configuration, but I think these are standard.

I was able to implement the mail step with @flexxxit answer and the following adicional setup on Gmail account to decrease its security when sending e-mails by apps: https://www.google.com/settings/security/lesssecureapps

Avoid this configuration because "your account is no longer protected by modern security standards" when turn on the "Access for less secure apps".

I made this test only to check if the Pentaho DI Job is working.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top