Since your SMTP server is using an invalid certificate, you will need to tell Mail to ignore TLS by adding ?ignoreTLS=true to your connection string like so:
0|x| ====== BEGIN MAIL #0 ======
0|x| (Mail not sent; to enable sending, set the MAIL_URL environment variable.)
0|x| Content-Type: text/plain
0|x| From: noreply@xxx.com
0|x| To: xxxx@gmail.com
0|x| Subject: test mail
0|x| Message-ID: 414592dc-6cd7-fe6f-6ba1-9d27a80a52bf@xxx.com
0|x| Content-Transfer-Encoding: 7bit
0|x| Date: Thu, 28 Mar 2019 01:27:29 +0000
0|x| MIME-Version: 1.0
0|x|
0|x| test content
0|x|
0|x| ====== END MAIL #0 ======
What location in your code?
Environment variables are normally set in the environment and not in code.
Meteor is nice and delays the reading of that environment variable until the first time that you try to send an email. This means that the order in which your code runs is important.
The error in the original post shows an attempt to send the email.
The error in the second post is the behaviour when MAIL_URL is not set prior to calling send
Which implies that either the code that sets MAIL_URL is not running before the send call, is throwing an error, or it is not running at all.
Did anything else change between the first and second post?