NAME

Sietima::Role::SubjectTag - add a tag to messages' subjects

VERSION

version 1.1.0

SYNOPSIS

my $sietima = Sietima->with_traits('SubjectTag')->new({
  %args,
  subject_tag => 'foo',
});

DESCRIPTION

A Sietima list with this role applied will prepend the given tag to every outgoing message's Subject: header.

ATTRIBUTES

subject_tag

Required string. This string, enclosed by square brackets, will be prepended to the Subject: header of outgoing messages. For example, the code in the "synopsis" would cause an incoming message with subject "new stuff" to be sent out with subject "[foo] new stuff".

If the incoming message's Subject: header already contains the tag, the header will not be modified. This prevents getting subjects like "[foo] Re: [foo] Re: [foo] new stuff".

MODIFIED METHODS

munge_mail

The subject of the incoming email is modified to add the tag (unless it's already there). The email is then processed normally.

AUTHOR

Gianni Ceccarelli <dakkar@thenautilus.net>

COPYRIGHT AND LICENSE

This software is copyright (c) 2023 by Gianni Ceccarelli <dakkar@thenautilus.net>.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.