comp.lang.ada
 help / color / mirror / Atom feed
From: Juan Rayas <juan.m.rayas@gmail.com>
Subject: Re: Attempt to send email using AWS results in Socket closed by peer
Date: Fri, 3 Sep 2021 13:29:47 -0700 (PDT)	[thread overview]
Message-ID: <907453a1-bee6-49b7-a181-04698d1d01adn@googlegroups.com> (raw)
In-Reply-To: <h2u4jg1otr2tmsui20qbif5hmg4r5bi65m@4ax.com>

On Friday, September 3, 2021 at 12:33:19 PM UTC-7, Doctor Who wrote:
> On Fri, 3 Sep 2021 11:11:41 -0700 (PDT), Juan Rayas 
> <juan.m...@gmail.com> wrote: 
> 
> >On Friday, September 3, 2021 at 1:59:33 AM UTC-7, Doctor Who wrote: 
> >> On Fri, 3 Sep 2021 09:32:27 +0200, "Dmitry A. Kazakov" 
> >> <mai...@dmitry-kazakov.de> wrote: 
> >> 
> >> >On 2021-09-03 00:19, Randy Brukardt wrote: 
> >> >> "Dmitry A. Kazakov" <mai...@dmitry-kazakov.de> wrote in message 
> >> >> news:sgol48$r20$1...@gioia.aioe.org... 
> >> >> ... 
> >> >>> Most mail servers do not accept unencrypted connections. 
> >> >> 
> >> >> That's news to me, as my mail server (you know, the one that runs 
> >> >> Ada-Comment and the other ARG lists) doesn't support encrypted connections. 
> >> >> I don't have any problem sending to GMail (I send copies of most of my 
> >> >> personal mail there). Something else must be wrong. 
> >> > 
> >> >The question is with what settings. There are hundreds of combinations 
> >> >of Port x unencrypted|StartTLS|TLS x authentication method. 
> >> > 
> >> >The port 465 was intended for TLS, then it was depreciated. Then they 
> >> >introduced other ports. Legacy mail servers pissed that all on etc. 
> >> > 
> >> > From experience, getting a SMTP client working is real pain. 
> >> he is better off using his own provider's mail server on port 25, it 
> >> will accept username/password as authentication. 
> >Hi all, 
> > 
> > thank you for your comments and responses. 
> > 
> >I tried changing the port number to 25, using the default port number in the SMTP.Client.Initialize procedure, and using other port numbers such as 587. I even tried just initializing the SMT server and sending the email (without authentication) as indicated in https://docs.adacore.com/aws-docs/aws/working_with_mails.html. 
> > 
> >In all cases, I get the following error: 
> > 
> >Can't send message :530 5.7.0 Must issue a STARTTLS command first. u7sm5705829pju.13 - gsmtp 
> > 
> >The problem is I don't know how to send the STARTTLS command with AWS. Anyone know how? 
> > 
> >My past experience was mostly with real-time embedded systems, so I don't have a lot of experience with email servers. I didn't expect this to be so difficult. Since this was mostly a toy to learn Ada, I may move on to other aspects of Ada for now. 
> > 
> >Thanks for all your comments. 
> >--Juan
> you have to change mail server:
> Isp := 
> SMTP.Client.Initialize 
> ("smtp.gmail.com", Port => 465, 
> Credential => Auth'Unchecked_Access);
> don't use gmail, use your provider mail server ...
Hi all,

 I changed the SMTP server to my ISP server (instead of Gmail), and changed the port back to 25. This worked!!

Thanks for your help and suggestions. Now on to learning other aspects of Ada.

--Juan

  reply	other threads:[~2021-09-03 20:29 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-01 18:58 Attempt to send email using AWS results in Socket closed by peer Juan Rayas
2021-09-01 19:43 ` Dmitry A. Kazakov
2021-09-02 22:19   ` Randy Brukardt
2021-09-03  7:32     ` Dmitry A. Kazakov
2021-09-03  8:59       ` Doctor Who
2021-09-03 18:11         ` Juan Rayas
2021-09-03 18:31           ` Dmitry A. Kazakov
2021-09-03 19:33           ` Doctor Who
2021-09-03 20:29             ` Juan Rayas [this message]
2021-09-01 20:02 ` Dennis Lee Bieber
2021-09-02  3:29 ` Richard Iswara
2021-09-02  4:03 ` Doctor Who
2021-09-02 22:22   ` Randy Brukardt
2021-09-03 20:35 ` Simon Wright
2021-09-03 21:13   ` Dmitry A. Kazakov
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox