Wrathchild
Technical User
I would like to include some standart text in the body of the email and then also redirect the contents of a file after the standard text.
This will include the standard text:
print "There was a problem executing the following SQL:" | mailx -s "$SQL_TYPE Failed" me@me.com
But when I try to add the file, none of the standard text is included in the email, just the external file shows:
print "There was a problem executing the following SQL:" | mailx -s "$SQL_TYPE Failed" me@me.com < SQL.sql
I realize I could add the standard text to SQL.sql to begin with, but I'm curious if it can be done this way.
This will include the standard text:
print "There was a problem executing the following SQL:" | mailx -s "$SQL_TYPE Failed" me@me.com
But when I try to add the file, none of the standard text is included in the email, just the external file shows:
print "There was a problem executing the following SQL:" | mailx -s "$SQL_TYPE Failed" me@me.com < SQL.sql
I realize I could add the standard text to SQL.sql to begin with, but I'm curious if it can be done this way.