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.5 required=3.0 tests=BAYES_05,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.6 X-Received: by 2002:ac8:7a98:: with SMTP id x24mr759200qtr.265.1630700987652; Fri, 03 Sep 2021 13:29:47 -0700 (PDT) X-Received: by 2002:a5b:58e:: with SMTP id l14mr1079914ybp.143.1630700987389; Fri, 03 Sep 2021 13:29:47 -0700 (PDT) Path: eternal-september.org!reader02.eternal-september.org!2.eu.feeder.erje.net!feeder.erje.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!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 13:29:47 -0700 (PDT) In-Reply-To: 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> <1194b579-9dc3-4e2e-b6ac-48755a7b2f10n@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <907453a1-bee6-49b7-a181-04698d1d01adn@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 20:29:47 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Xref: reader02.eternal-september.org comp.lang.ada:62624 List-Id: 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=20 > wrote:=20 >=20 > >On Friday, September 3, 2021 at 1:59:33 AM UTC-7, Doctor Who wrote:=20 > >> 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 conn= ections.=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 combination= s=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.=20 > >> he is better off using his own provider's mail server on port 25, it= =20 > >> will accept username/password as authentication.=20 > >Hi all,=20 > >=20 > > thank you for your comments and responses.=20 > >=20 > >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/a= ws/working_with_mails.html.=20 > >=20 > >In all cases, I get the following error:=20 > >=20 > >Can't send message :530 5.7.0 Must issue a STARTTLS command first. u7sm5= 705829pju.13 - gsmtp=20 > >=20 > >The problem is I don't know how to send the STARTTLS command with AWS. A= nyone know how?=20 > >=20 > >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 s= o difficult. Since this was mostly a toy to learn Ada, I may move on to oth= er aspects of Ada for now.=20 > >=20 > >Thanks for all your comments.=20 > >--Juan > you have to change mail server: > Isp :=3D=20 > SMTP.Client.Initialize=20 > ("smtp.gmail.com", Port =3D> 465,=20 > Credential =3D> 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 A= da. --Juan