HaHaWTH / AuthMeReReloaded

A fork of AuthMe with various bug fixes and new exciting features
https://modrinth.com/plugin/authmerereloaded
GNU Affero General Public License v3.0
68 stars 7 forks source link

Email sending error #131

Closed 05678 closed 2 months ago

05678 commented 2 months ago

What behaviour is observed?

When I try to use the shutdown email function, this error appears in the console: [AuthMe] Failed to send a mail to [05678.soulitegames@gmail.com]: [EmailException]: Sending the email to the following server failed : smtp.163.com:465

My config:

Email SMTP server host

mailSMTP: smtp.163.com
# Email SMTP server port
mailPort: 465
# Only affects port 25: enable TLS/STARTTLS?
useTls: true
# Email account which sends the mails
mailAccount: biztonsag@ryzenmc.hu
# Email account password
mailPassword: xk3b6NoA1eoUQW6pf49MtN20wcSLWb$
# Email address, fill when mailAccount is not the email address of the account
mailAddress: ''
# Custom sender name, replacing the mailAccount name in the email
mailSenderName: RyzenMC
# Recovery password length
RecoveryPasswordLength: 12
# Mail Subject
mailSubject: Your new AuthMe password
# Like maxRegPerIP but with email
maxRegPerEmail: 1
# Recall players to add an email?
recallPlayers: false
# Delay in minute for the recall scheduler
delayRecall: 5
# Send the new password drawn in an image?
generateImage: false
# The OAuth2 token
emailOauth2Token: ''
# Email notifications when the server shuts down
shutDownEmail: true
# Email notification address when the server is shut down
shutDownEmailAddress: 05678.soulitegames@gmail.com

(I do not use the email anymore, so you can try the password if you want)

Expected behaviour

I get the email

To Reproduce

.

Plugin list

Only the authmerereloaded

Server Implementation

Standalone(Spigot)

Database Implementation

MariaDB

AuthMe Version

5.6.0 (latest)

Error log (if applicable)

.

Configuration

.

05678 commented 2 months ago

I also tried using zoho smtp servers, but the error is the same

05678 commented 2 months ago

Oh and sry, here is the error from the log: [04-22 22:06:40]: [WARN] Failed to send a mail to [05678.soulitegames@gmail.com]: [EmailException]: Sending the email to the following server failed : smtp.163.com:465 [04-22 22:06:40]: fr.xephi.authme.libs.org.apache.commons.mail.EmailException: Sending the email to the following server failed : smtp.163.com:465 at fr.xephi.authme.libs.org.apache.commons.mail.Email.sendMimeMessage(Email.java:1298) at fr.xephi.authme.libs.org.apache.commons.mail.Email.send(Email.java:1282) at fr.xephi.authme.mail.SendMailSsl.sendEmail(SendMailSsl.java:106) at fr.xephi.authme.mail.EmailService.sendShutDown(EmailService.java:166) at fr.xephi.authme.AuthMe.onDisable(AuthMe.java:401) at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:323) at org.bukkit.plugin.java.JavaPluginLoader.disablePlugin(JavaPluginLoader.java:360) at org.bukkit.plugin.SimplePluginManager.disablePlugin(SimplePluginManager.java:427) at org.bukkit.plugin.SimplePluginManager.disablePlugins(SimplePluginManager.java:420) at org.bukkit.craftbukkit.v1_8_R3.CraftServer.disablePlugins(CraftServer.java:348) at net.minecraft.server.v1_8_R3.MinecraftServer.stop(MinecraftServer.java:423) at net.minecraft.server.v1_8_R3.MinecraftServer.run(MinecraftServer.java:619) at java.lang.Thread.run(Thread.java:748) Caused by: fr.xephi.authme.libs.javax.mail.NoSuchProviderException: smtp at fr.xephi.authme.libs.javax.mail.Session.getService(Session.java:842) at fr.xephi.authme.libs.javax.mail.Session.getTransport(Session.java:772) at fr.xephi.authme.libs.javax.mail.Session.getTransport(Session.java:713) at fr.xephi.authme.libs.javax.mail.Session.getTransport(Session.java:693) at fr.xephi.authme.libs.javax.mail.Session.getTransport(Session.java:750) at fr.xephi.authme.libs.javax.mail.Transport.send0(Transport.java:225) at fr.xephi.authme.libs.javax.mail.Transport.send(Transport.java:100) at fr.xephi.authme.libs.org.apache.commons.mail.Email.sendMimeMessage(Email.java:1295) ... 12 more

HaHaWTH commented 2 months ago

Which email service your account biztonsag@ryzenmc.hu is using as the backend(Not the config file) ? You should change the SMTP server address match your email service.

If this email service is set up by yourself, you should change the SMTP server to ur own.

05678 commented 2 months ago

The email is created on zoho, but I also tried the service in it, with tls and without, also changing the ports, but nothing helped.

05678 commented 2 months ago

The config I tried:

Email SMTP server host

mailSMTP: smtppro.zoho.eu
# Email SMTP server port
mailPort: 587
# Only affects port 25: enable TLS/STARTTLS?
useTls: true
# Email account which sends the mails
mailAccount: biztonsag@ryzenmc.hu
# Email account password
mailPassword: xk3b6NoA1eoUQW6pf49MtN20wcSLWb$
# Email address, fill when mailAccount is not the email address of the account
mailAddress: ''
# Custom sender name, replacing the mailAccount name in the email
mailSenderName: RyzenMC
05678 commented 2 months ago

And the error (the same): [04-23 07:34:15]: [WARN] Failed to send a mail to [05678.soulitegames@gmail.com]: [EmailException]: Sending the email to the following server failed : smtppro.zoho.eu:587 [04-23 07:34:15]: fr.xephi.authme.libs.org.apache.commons.mail.EmailException: Sending the email to the following server failed : smtppro.zoho.eu:587 at fr.xephi.authme.libs.org.apache.commons.mail.Email.sendMimeMessage(Email.java:1298) at fr.xephi.authme.libs.org.apache.commons.mail.Email.send(Email.java:1282) at fr.xephi.authme.mail.SendMailSsl.sendEmail(SendMailSsl.java:106) at fr.xephi.authme.mail.EmailService.sendShutDown(EmailService.java:166) at fr.xephi.authme.AuthMe.onDisable(AuthMe.java:401) at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:323) at org.bukkit.plugin.java.JavaPluginLoader.disablePlugin(JavaPluginLoader.java:360) at org.bukkit.plugin.SimplePluginManager.disablePlugin(SimplePluginManager.java:427) at org.bukkit.plugin.SimplePluginManager.disablePlugins(SimplePluginManager.java:420) at org.bukkit.craftbukkit.v1_8_R3.CraftServer.disablePlugins(CraftServer.java:348) at net.minecraft.server.v1_8_R3.MinecraftServer.stop(MinecraftServer.java:423) at net.minecraft.server.v1_8_R3.MinecraftServer.run(MinecraftServer.java:619) at java.lang.Thread.run(Thread.java:748) Caused by: fr.xephi.authme.libs.javax.mail.NoSuchProviderException: smtp at fr.xephi.authme.libs.javax.mail.Session.getService(Session.java:842) at fr.xephi.authme.libs.javax.mail.Session.getTransport(Session.java:772) at fr.xephi.authme.libs.javax.mail.Session.getTransport(Session.java:713) at fr.xephi.authme.libs.javax.mail.Session.getTransport(Session.java:693) at fr.xephi.authme.libs.javax.mail.Session.getTransport(Session.java:750) at fr.xephi.authme.libs.javax.mail.Transport.send0(Transport.java:225) at fr.xephi.authme.libs.javax.mail.Transport.send(Transport.java:100) at fr.xephi.authme.libs.org.apache.commons.mail.Email.sendMimeMessage(Email.java:1295) ... 12 more

HaHaWTH commented 2 months ago

https://www.zoho.com/mail/help/zoho-smtp.html  Have you configured mail settings with this doc?

05678 commented 2 months ago

Yes I do

05678 commented 2 months ago

This config is workimg fine in the official authme

HaHaWTH commented 2 months ago

https://github.com/HaHaWTH/AuthMeReReloaded/actions/runs/8804266695

Try this version

05678 commented 2 months ago

The problem is still the same

05678 commented 2 months ago

You can try to send me an email with that biztonsag@ryzenmc.hu to 05678.soulitegames@gmail.com

HaHaWTH commented 2 months ago

You can try to send me an email with that biztonsag@ryzenmc.hu to 05678.soulitegames@gmail.com

Were all email features broken including Email Registration? Or just shutdown mail sending?

05678 commented 2 months ago

All the things are broken

HaHaWTH commented 2 months ago

All the things are broken

Works on original AuthMe, right?

05678 commented 2 months ago

Yes I tried it

HaHaWTH commented 2 months ago

IMG_3775 Fixed, now works properly

HaHaWTH commented 2 months ago

https://github.com/HaHaWTH/AuthMeReReloaded/actions/runs/8813730816

05678 commented 2 months ago

Thank you!