Mail::Sender and Precedence: bulk

This is the constructor I (almost) always use when using Mail::Sender.

my $sender=new Mail::Sender {from=>'webmaster@ringways.co.uk',
             reply=>'webmaster@ringways.co.uk',
             headers=>'Precedence: bulk',
             smtp=>'mail.ringways.co.uk',
             fake_from=>'Webmaster <webmaster@ringways.co.uk>'};

(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.
0
gary
4/21/2017 8:46:07 AM
perl.beginners 29246 articles. 3 followers. Follow

1 Replies
128 Views

Similar Articles

[PageSpeed] 24

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=>'webmaster@ringways.co.uk',
>              reply=>'webmaster@ringways.co.uk',
>              headers=>'Precedence: bulk',
>              smtp=>'mail.ringways.co.uk',
>              fake_from=>'Webmaster <webmaster@ringways.co.uk>'};
>
> (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
0
gary
4/21/2017 9:38:45 AM
Reply: