From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=0.8 required=3.0 tests=BAYES_50,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.6 X-Received: by 2002:ac8:7d88:: with SMTP id c8mr247120qtd.208.1630692702412; Fri, 03 Sep 2021 11:11:42 -0700 (PDT) X-Received: by 2002:a25:4441:: with SMTP id r62mr453348yba.166.1630692702181; Fri, 03 Sep 2021 11:11:42 -0700 (PDT) Path: eternal-september.org!reader02.eternal-september.org!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Fri, 3 Sep 2021 11:11:41 -0700 (PDT) In-Reply-To: <5to3jglkdgcm307ngd1ek8vjaqb7ofjk6e@4ax.com> Injection-Info: google-groups.googlegroups.com; posting-host=76.168.7.137; posting-account=d3k5YgoAAABkSw3WsP6aBXVx_QbzbTl9 NNTP-Posting-Host: 76.168.7.137 References: <57c7ca69-cc99-45ae-b494-580536a99ef4n@googlegroups.com> <5to3jglkdgcm307ngd1ek8vjaqb7ofjk6e@4ax.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <1194b579-9dc3-4e2e-b6ac-48755a7b2f10n@googlegroups.com> Subject: Re: Attempt to send email using AWS results in Socket closed by peer From: Juan Rayas Injection-Date: Fri, 03 Sep 2021 18:11:42 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Xref: reader02.eternal-september.org comp.lang.ada:62620 List-Id: 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"=20 > wrote:=20 >=20 > >On 2021-09-03 00:19, Randy Brukardt wrote:=20 > >> "Dmitry A. Kazakov" wrote in message=20 > >> news:sgol48$r20$1...@gioia.aioe.org...=20 > >> ...=20 > >>> Most mail servers do not accept unencrypted connections.=20 > >>=20 > >> That's news to me, as my mail server (you know, the one that runs=20 > >> Ada-Comment and the other ARG lists) doesn't support encrypted connect= ions.=20 > >> I don't have any problem sending to GMail (I send copies of most of my= =20 > >> personal mail there). Something else must be wrong.=20 > >=20 > >The question is with what settings. There are hundreds of combinations= =20 > >of Port x unencrypted|StartTLS|TLS x authentication method.=20 > >=20 > >The port 465 was intended for TLS, then it was depreciated. Then they=20 > >introduced other ports. Legacy mail servers pissed that all on etc.=20 > >=20 > > 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=20 > 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 th= e SMTP.Client.Initialize procedure, and using other port numbers such as 58= 7. I even tried just initializing the SMT server and sending the email (wit= hout 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. u7sm5705= 829pju.13 - gsmtp The problem is I don't know how to send the STARTTLS command with AWS. Anyo= ne know how? My past experience was mostly with real-time embedded systems, so I don't h= ave a lot of experience with email servers. I didn't expect this to be so d= ifficult. 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