Closed Le-Thom closed 3 years ago
Issue-Label Bot is automatically applying the label bug
to this issue, with a confidence of 0.71. Please mark this comment with :thumbsup: or :thumbsdown: to give our bot feedback!
Links: app homepage, dashboard and code for this bot.
Seems like you never login in your account. So it's logic to get this error. Please use the login effect before trying to use SkEmail
Ok thanks but now this is not an error but skript can't recover the author of the mails...
i didn't change the versions and this is my new code:
options:
prefix: §8[§6Mail§8]
command /testmail <text>:
trigger:
set {_mail} to arg-1
if {_mail} do not contain "@":
stop
set {mail.%player%} to {_mail}
add player to {mail.newsletter::*}
make new mail:
set author of email to "noreply@lethom.xyz"
set receiver of email to "%{_mail}%"
set object of email to "Inscription à la Newsletter de LeJEU"
set body of email to "Bonjour %player%, Merci de vous être inscrit à la liste de diffusion des nouveautés du serveur :D Vous recevrez toutes les nouveautés et informations du serveur à l'adresse mail suivante : %{_mail}%. %nl%%nl%Si vous souhaitez vous désinscrire veuillez répondre à ce mail."
login to roundcube service from mail "/mail/" and password "/password/"
send last mail created
send "{@prefix} §aVotre email à été enregistré pour recevoir les nouveautés ! Allez vite check vos mails :D" to player
disconnect "/mail/" from all connected mails
command /check_mails:
permission: console
trigger:
login to roundcube service from mail "/mail/" and password "/password/"
send "Connected" to console
set {_mails::*} to last 1 mails
loop {_mails::*}:
set {_mail} to loop-value
set {_author} to the author of loop-value
send "Mail de %{_author}%" to console
loop {mail.newsletter::*}:
if {_author} is {mail.%loop-value-2%}:
set {_mail} to {mail.%loop-value-2%}
make new mail:
set author of email to "noreply@lethom.xyz"
set receiver of email to "%{_mail}%"
set object of email to "Désinscription de la Newsletter"
set body of email to "Bonjour %loop-value-2%, ce mail vous confirme votre désinscription au service de Newsletter du serveur ! A très bientôt :D"
send last mail created
remove loop-value-2 from {mail.newsletter::*}
send "EMAIL SENDED" to console
disconnect "/mail/" from all connected mails
Try to use the login
effect in the on load
or on skript load
event and try the on email connected
event to check if your account is correctly connected
Closed due to inactivity
<--! To make sure you have all the keys in hand to be able to help you, I invite you to fill out the form as proposed below, including information about your server. Are you ready to go? Let's do it! (just delete wrong informations) -->
Versions:
I'm using a minecraft server 1.16.1 (Paper-117) I'm using skript version 2.5.1 I'm using SkEmail version 1.7 About the issue:
I got a [java|skript] error:
My code is:
I think the problem comes from the expression "last 2 mails"... It's seems that skript can't save the mails in the list