0

Good morning all.

I'm having some trouble using mailto command in an SQR. Here is the command I have.

let $From = ' -- -F "Human Resources Administration"'
let $text =  $TotCnt || ' Body ' || $prcs_process_instance || '. '
let $mail_cmd='/usr/bin/echo "' || $text || '"|/usr/bin/mailx -s ' || $subject_append || $email_addr || $From

I have a unix command line statement:

/usr/bin/echo "Subject "|/usr/bin/mailx -s "Body" -r '"Human Resources Administration"' someemail@gmail.com

If I run that command line statement in PuTTY I get the desired results. I'm trying to make that command line statement work for my sqr. I can't figure it out. Basically, when I run this process I want to receive an email from "Human Resources administration". What it does is sends me an email from appdev, to: Administration, Resources, Human. I'm on peopletools 8.55, HCM 9.2. Unix on Linux. Any help would be much appreciated, thanks all!

Robert
  • 23
  • 3
  • Have you done a Show $mail_cmd to see what it looks like? Does it match the unix command line statement you show? Also, you don't show the other variables so it is hard to interpret it. – cardmagik Oct 29 '17 at 19:22

1 Answers1

0

The format of a return address is this:

-r  'Human Resources Administration<someaddress@domain.tld>'
gview
  • 14,876
  • 3
  • 46
  • 51
  • this does not work. I tried adding this to my unix command line statement and I I get errors. I tried incorporating into SQR. Nothing. I mean I already said that the following command already works. /usr/bin/echo "Subject "|/usr/bin/mailx -s "Body" -r '"Human Resources Administration"' someemail@gmail.com – Robert Oct 23 '17 at 15:37
  • When you say that works, it clearly isn't doing what you thought it was, because the -r parameter requires a valid email string. What is the exact string that you tried with my variation? Are you trying single quotes? You need either single or double quotes with unix. There is rarely a reason to use both. With single quotes it's a string literal, which is what I would suggest here. Double quotes get interpolated, so there is a potential danger there and when you use <> those are redirection characters in linux. I will update my suggestion. – gview Oct 23 '17 at 19:38