Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

mailx -s "test" ewang@yahoo.com Not working!

Status
Not open for further replies.

hyy1109

IS-IT--Management
Dec 16, 2002
27
US
I use the following on Unix and enter and see > waiting for my next input from the Unix prompt. Why the following can't finish itself and send me an email?

Thanks!

mailx -s "test" ewang@yahoo.com

 
'cause it's wait for the "body of the email/text" to be mailed.

mailx -s &quot;subject here&quot; me@address.here <<!
here's the mail body text
!
vlad
+----------------------------+
| #include<disclaimer.h> |
+----------------------------+
 
So, could you please tell me how to add input here...

mailx -s &quot;test&quot; ewang@yahoo.com
 
How to say this is the end of the email body in mailx?
Thanks!

mailx -s &quot;subject here&quot; me@address.here <<emmail body



 
You can use vgersh99's example of using the here-to document:

<<!
stuff
!

or

echo &quot;your stuff&quot; | mail -s &quot;test&quot; yourname@address.com

or

mail -s &quot;test&quot; yourname@address.com < /tmp/textfile
 
Great response!

Thanks and Happy Holidays!

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top