Results 1 to 8 of 8
Jul 25, 2013, 14:40 #1
- Join Date
- Jul 2013
- 0 Post(s)
- 0 Thread(s)
$mailprog Flags change in NMS Formail Script from "-oi -t" to "-f"
Hello, hope someone can help as I've been tearing my hair out with this one.
I've been using Matts Script Archive Formail for many years without any problem and have always been able to make tweaks to code using the 'ReadMe' file and a bit of search engine work, however I'm drawing a blank on a particular issue and I have a very limited understanding of Perl!
A new site I'm producing is being hosted on a server that asks for the following:
Within the script, the mail program used for sending mail is /usr/lib/sendmail . You should not use this with the -t argument (which find the From and To in the email) but use -f 'from-email-address' 'to-email-address' in place of the -t argument.
I've removed my previously trusted "-oi -t" and tweaked it as follows:
firstname.lastname@example.org to email@example.com (believe me this took me ages to work out!)
However I obviously need to replace the 'firstname.lastname@example.org' for the actual sender and recipient, and this is where I get stuck!
My assumption is that I just need to replace the 'email@example.com' with variables defined in the formail script, but I'm afraid I don't understand enough to work this out and all my attempts so far have failed!
I'd hoped something like this would work:
$mailprog = '/usr/lib/sendmail -f $from $to';
If anyone can advise I would be *very* grateful.
PS I can paste in the code from the NMS Formail Script if required - I've assumed that folks here are familiar with it?