Hello there!
I noticed that during debug and local testing I'm able to send emails with smtp.
I tried just now with the release jar file over a VPS and everything is workin, except the smtp stuff.
Code snippet:
Main.settings is a text files that contains all the parameters for the email adress.
I would like to underline again that this code works in debug, but seems to not work aftere release
Am I missing something?
I noticed that during debug and local testing I'm able to send emails with smtp.
I tried just now with the release jar file over a VPS and everything is workin, except the smtp stuff.
Code snippet:
B4X:
Sub SendInfoMail
SMTP.Initialize(Main.settings.Get("smtp"), Main.settings.Get("port"), Main.settings.Get("account"), Main.settings.Get("pwd"), "SMTP")
SMTP.UseSSL = True
SMTP.To.Add(Main.settings.Get("infomail"))
SMTP.Subject = $"WEBAPP - Nuovo ordine da ${ws.Session.GetAttribute("username")}"$
SMTP.Sender.Replace(SMTP.Sender, "WEBAPP PELISSA")
SMTP.HtmlBody = True
SMTP.Body = $"Nuovo ordine inoltrato da <b>${ws.Session.GetAttribute("username")}</b><br>
spedito il ${giorno} alle ${ora}<br><br>
In allegato copia PDF come spedita al cliente.
<br><br><br>
Si prega di intervenire su VERDE per la corretta acquisizione del documento."$
SMTP.AddAttachment(File.DirApp, $"${documentName}.pdf"$)
SMTP.Send
Sleep(100000)
File.Delete(File.DirApp, $"${documentName}.pdf"$)
End Sub
Main.settings is a text files that contains all the parameters for the email adress.
I would like to underline again that this code works in debug, but seems to not work aftere release
Am I missing something?
Last edited: