Android Question Sending email using SMTP

Juzer Hussain

Active Member
Licensed User
Longtime User
Hi All,

I have been sending email using below code. I recently changed to B4A 10 and changed my mail server also.After that mails are not going.I checked mail client there everything is fine.
Mails are going.

B4X:
    Dim smtp1 As SMTP
    smtp1.Initialize("mail.xxx.com",587,"user id","password","s")
    smtp1.To.Add(recepient emailid)
    smtp1.Subject="Subject line"
    smtp1.Body="Dear User, xxxx"
    smtp1.Sender="sender name"
    smtp1.UseSSL=True
    smtp1.StartTLSMode=True
    smtp1.AuthMethod=smtp1.AUTH_LOGIN
    smtp1.Send

I tried changing port no to 222, 25.

Can anyone give some clue.

Juzer
 

Juzer Hussain

Active Member
Licensed User
Longtime User
Hi DonManfred,

I have been checking different options but nothing seems working.
My mail server is 103.21.59.175

when is use
useSSL=true it says "server refused connection"
and when
StartTSLMode =true - it says "503-Bad sequence of commands"

Mail from mail client are going.
Can u guess what is the reason.

Thanks
Juzer
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
Can u guess what is the reason.
NO. As written above ou need to provide MORE informations. I asked which provider you are using. They maybe have any Documentation about the Setup.

Tip: Use the Domainname instead of an IP. the ip is probably used for the webserver. Call it in a browser and you´ll receive a website...
 
Upvote 0

Juzer Hussain

Active Member
Licensed User
Longtime User
Hi DonManfred
I talked to ISP yesterday. There was conflict in DNS settings which they refreshed and after sometime it started working.
Juzer
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…