I make my bash scripts send mail through a simple "mail.sh" script (see attached code snippet).
But for a few days, I cannot send anymore this way. I tried an smtp session manually, and apparently the problem is that the end of the message is not recognised.
Yet I enter a dot on a line by itself just as the smtp server says to do ("Enter mail, end with "." on a line by itself").
And it used to work beautifully.
Any idea what I add to my script to make the smtp server recognize the end of DATA ?
thanks a lot
PS : I do not have control over the smtp server
nc mymailserver.com 25 << FIN
auth plain aaaa_MYBASE64PASSWORD___aaa
MAIL FROM: firstname.lastname@example.org
RCPT TO: $1