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 Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using system()...to call mailx

Status
Not open for further replies.

awolff01

Programmer
Joined
Jun 17, 2003
Messages
55
Location
US
Hello,

I need to write a script to send mail to a user.

My plan is to use:

system(mailx -s &quot;Script $f returned $sub&quot; me@me.com < body);

for some reason I get a whole bunch of errors:

Bareword found where operator expected at testpl.pl line 22, near &quot;&quot;Script $f Returned with RC = $1&quot; awolff&quot;
(Missing operator before awolff?)

Is my syntax incorrect? Or is running mailx via system() not possible?

Thank You!!

 
system(&quot;mailx -s \&quot;Script $f returned $sub\&quot; me@me.com < body&quot;);

HTH
--Paul
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top