SMTP send error

jpvniekerk

Active Member
Licensed User
Longtime User
I frequently get this LastException message when sending an email with SMTP.Send.

org.apache.commons.net.smtp.SMTPConnectionClosedException:
Connection closed without indication.

It happens frequently when I use the data connection, and very seldom when connected via WiFi.

What would cause this error?
Is there anything I can do to prevent this from happening?

Thanks for any help
 

jpvniekerk

Active Member
Licensed User
Longtime User
Erel,

There are no attachments - only one line in the body to test.

I have tried and retried multiple times. No luck. I can send an email from my email program on the phone just fine with the same connection. When the phone is connected to my WiFi it sends 100%.

I use port 587 (can't remember where I got this from!). I tried with 465, but then I get a different error - even through WiFi. Should I try a different port?

The problem occurs in a big program. I am making up a simulated program (using exactly the same steps for the email portion of the big program, and will put that here when I'm done.
 
Upvote 0

jpvniekerk

Active Member
Licensed User
Longtime User
I think the problem lies with my email host.

I tried to send the emails from a gmail account - so far had 100% success connected to my WiFi and 100% success using data connection (cell).

I have contacted my host, but they don't seem to know what's going on either
 
Upvote 0

abner69

Member
Licensed User
Longtime User
One other thing you might want to check on is see if your isp requires any type of smtp authentication to access the server..

...Pablo
 
Upvote 0

jpvniekerk

Active Member
Licensed User
Longtime User
Latest from my host is :
port 26
server requires authentication

For the latter do I just use SMTP1.UseSSL = True? I can't find anything else about authentication.
 
Upvote 0

jpvniekerk

Active Member
Licensed User
Longtime User
Nope - that didn't work either

With UseSSL = True I got an authentication error (or something like that)
With UseSSL = False I got the same error as in the first post when connected via data. Connected via WiFi worked (as per original post).
 
Last edited:
Upvote 0
Top