Unix- email script problem

  • abbeyuk
  • Born
  • Born
  • abbeyuk
  • Posts: 3
  • Loc: UK

Post 3+ Months Ago

Hi Friends

This is my first forum question
We want to email a copy of report instead of printing so wrote

/usr/bin/mailx -a $PRINTFILE -s "Subject Report" am@....co.uk < donotreply

donotreply is the name of txt file where a mesg is written "do not reply"
am@.... is the email address who receives it

This works fine

I have taken this part and written in another file
/usr/bin/mailx -a $1 -s $2 $3 < $4
and that file is executed by

lvx%filename reportfilename.pdf "Subject Report" am@...co.uk donotreply

Now problem is when i try sending actual parameter Subject with literal "Subject Report" which has space between 2 words it just takes the first word and prints "Subject in the Subject part of the email which i receive for testing .

Any help how to pass literal with spaces as parameter.

Your help will be appreciated
Abi
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • Don2007
  • Web Master
  • Web Master
  • Don2007
  • Posts: 4924
  • Loc: NY

Post 3+ Months Ago

I thought that the quotes would have solved that problem. What about Subject%20Report ?
  • abbeyuk
  • Born
  • Born
  • abbeyuk
  • Posts: 3
  • Loc: UK

Post 3+ Months Ago

if i write Subject%20Report then subject title appears as Subject%20Report
I want Subject Report as my title of email.
Sorry it didn't work
  • Don2007
  • Web Master
  • Web Master
  • Don2007
  • Posts: 4924
  • Loc: NY

Post 3+ Months Ago

Suppose you use Subject_Report or just Report until you find a workaround?
  • abbeyuk
  • Born
  • Born
  • abbeyuk
  • Posts: 3
  • Loc: UK

Post 3+ Months Ago

I suggested using underscore but Senior wants it to be a parameter.
like Subject_Report it works but NO wants parameter passing.

Any Ideas
Please reply

Cheerio
Abi

Post Information

  • Total Posts in this topic: 5 posts
  • Users browsing this forum: No registered users and 59 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.