iOS Question sending mail smtp

Jorgelcr

Active Member
Licensed User
Hello,
I have the following code for b4a and it works fine.
I have implemented it in b4i and it does not send mail.
It gives me an error:
unsupported login mechanism


B4X:
SMTP.Initialize("smtp.serxxx.es", 465, "info@asxxx.es", "xxx", "SMTP")
                
SMTP.UseSSL=True
SMTP.StartTLSMode = False
SMTP.To.Add(example@gmail.com)
                
SMTP.Subject = "Registro APP"
mensaje="Bienvenido "
                
SMTP.Body = mensaje
            
SMTP.Send


can anybody help me?
 

Semen Matusovskiy

Well-Known Member
Licensed User
Net library for Android is not absolutelly equal to iNet under IOS. For example, under B4A there is AuthMethod unlike B4i

Try to set SMTP.DebugLogs = True and look a log. For example, for my mailserver:
C: Attempting to connect to server at: ***
S: 220 *** ESMTP MailEnable Service, Version: 10.25-- ready at 09/14/20 17:48:35
C: EHLO localhost

S: 250-***, this server offers 5 extensions
S: 250-AUTH LOGIN
S: 250-SIZE 40960000
S: 250-HELP
S: 250-AUTH=LOGIN
S: 250 STARTTLS
C: AUTH LOGIN
***

At least, it's visible, what a mail server supports.
 
Upvote 0

Ebic

Member
Licensed User
First step is to find which authentication methods are supported by your email server. If you have control over the server then enable one of the two methods posted above.
Suppose my server supports 250-AUTH LOGIN how to proceed for sending?
thank you
 
Upvote 0
Top