Using telnet to send test emails over smtp fails when using stdin-redirection (pipes or heredocs)
Issue
-
I'm using a script that tests smtp email connectivity. The script uses the
telnetcommand and worked in HP-UX but I can't get it to work in RHEL ... it always fails.telnet mailserver 25 <<EOF HELO xxxx MAIL FROM: xxxx RCPT TO: xxxx SUBJECT: xxxx DATA From: xxxx To: xxxx Subject: xxxx xxxxx (body here) xxxx . QUIT EOF
Environment
- Red Hat Enterprise Linux
telnetcommand
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
