Sorry to both you all. As usual, having posted asking for help I've managed to
find the answer.
In stripping out all the bits that I thought were not required to make this
post I spotted the syntax error that was causing the issue.
By putting the code exactly as shown into a dummy program it worked fine. By
fixing the syntax errors the original program now also works.
Gary
On Friday 21 April 2017 09:46:07 Gary Stainburn wrote:
> This is the constructor I (almost) always use when using Mail::Sender.
>
> my $sender=new Mail::Sender {from=>'[email protected]',
> reply=>'[email protected]',
> headers=>'Precedence: bulk',
> smtp=>'mail.ringways.co.uk',
> fake_from=>'Webmaster <[email protected]>'};
>
> (I can't remember why I had to include the fake_from)
>
> I then send the email using something like:
>
> my $resp=$sender->MailFile({to=>$options{email},
> subject=>"Available stock Report",
> msg=>'Attached is the spreadsheet containing the available stock list',
> file=>$fname});
>
> The problem I have is that the headers line doesn't seem to be working as
> there is no Precedence line in the emails received.
>
> This is an old server which hasn't been updated in a while, so I don't
> think anything has been updated for a while, so presumably it hasn't worked
> for ages (if ever).
>
> I've Google'd this and there is nothing out there that I could find on how
> to use the headers argument properly.
>
> Can anyone suggest what I need to change to get it to work.
--
Gary Stainburn
Group I.T. Manager
Ringways Garages
http://www.ringways.co.uk
https://fundraise.cancerresearchuk.org/page/garys-march-march
--
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
http://learn.perl.org/