[Gambas-user] SMTP Client errors - Sending Email

Rolf-Werner Eilert eilert-sprachen at ...221...
Tue Aug 20 16:52:01 CEST 2013



Am 20.08.2013 15:52, schrieb Marty:
> God Morning All,
>
> I'm using gb.smpt to send email from a Gambas routine. The routine is:
>
> 12 Public Sub btnSend_Click()
> 13
> 14  Dim t$ As String
> 15      Dim email As New SmtpClient
> 16
> 17      t$ = File.Load("/home/marty/Test.txt")
> 18
> 19      With email
> 20        .Add("Hello")
> 21        .Add(t$, Mime.Default, "Test.txt")
> 22        .To.Add("xxxxxx at ...3172...")
> 23        .From = "xxxxxx at ...3172..."
> 24        .Subject = "Linux Test"
> 25        .Encrypt = Net.SSL
> 26        .Port = 465
> 27        .Host = "smtp.xxxx.com"
> 28        .User = "xxxxxxx at ...3172..."
> 29        .Password = "password"
> 30        .Debug = True
> 31     End With
> 32
> 33      email.Send()
>
> End
>
> Sensitive data removed. There are multiple errors:
>
> 1. If I include the line to add an attachment -"Cannot find Mime subtype
> in line 33"
>
> 2.If I use Net.SSL with port 465  "Error 535 Authentication failed"
>       My account should use SSL and port 465. That's the way it is set up
> on Windows.
>       Debug output:
> <- 220 relay01.dlls.pa.xxxxxxx.net ESMTP Postfix
>
> -> ehlo marty-xxxxxxxxxxxxxxxxxxxx
>
> <- 250-relay01.dlls.pa.xxxxx.net
> 250-PIPELINING
> 250-SIZE 36350634
> 250-ETRN
> 250-AUTH LOGIN PLAIN
> 250-AUTH=LOGIN PLAIN
> 250-ENHANCEDSTATUSCODES
> 250-8BITMIME
> 250 DSN
>
> -> auth plain AG1tY2cyOTQ0MEBmcm9udGllci5jb20AOTA2NlBvDQo=
>
> <- 535 5.7.8 Error: authentication failed: authentication failure
>
> -> quit
>
> No matter what I try the message is not sent. The docs say that V 3.4
> supports encryption.
> Can you  tell me where I'm going wrong? I'm running Ubuntu 12.04. Is it
> possible that SSL is not installed? How can I check it? Then how to
> install it?
>
> Thanks for your patience and help!
>
> Marty
>

Hi Marty,

Not a spontaneous help, but as you will see in this list, I have had the 
same or a similar problem with it during the last weeks. At least I can 
say that I got no error with the Mime. thing, but I had a pdf to attach 
and used Mime.Binary (no idea if that was correct, but there were no 
complaints).

I tried with different providers and their different settings. With SSL, 
I got no message at all, just ->quit. With TLS I got the same kind of 
errors and found no way to solve them. That provider uses STARTTLS, 
maybe it's not been fully implemented yet.

Eventually I used an external tool for sending the mails.

Regards
Rolf




More information about the User mailing list