]> git.donarmstrong.com Git - debbugs.git/blobdiff - Debbugs/Mail.pm
* create an empty pseudo-package.maint file
[debbugs.git] / Debbugs / Mail.pm
index 032dea9c714d9b35e200087fe082f453aca04dfd..054b04c2bbb22ab3c92ebef1e8a3d88303e0c7f4 100644 (file)
@@ -49,14 +49,16 @@ use Debbugs::MIME qw(encode_rfc1522);
 use Debbugs::Config qw(:config);
 use Params::Validate qw(:types validate_with);
 
+use Debbugs::Packages;
+
 BEGIN{
      ($VERSION) = q$Revision: 1.1 $ =~ /^Revision:\s+([^\s+])/;
      $DEBUG = 0 unless defined $DEBUG;
 
      @EXPORT = ();
-     %EXPORT_TAGS = (addresses => qw(get_addresses),
-                    misc      => qw(rfc822_date),
-                    mail      => qw(send_mail_message encode_headers default_headers),
+     %EXPORT_TAGS = (addresses => [qw(get_addresses)],
+                    misc      => [qw(rfc822_date)],
+                    mail      => [qw(send_mail_message encode_headers default_headers)],
                    );
      @EXPORT_OK = ();
      Exporter::export_ok_tags(keys %EXPORT_TAGS);
@@ -101,6 +103,8 @@ In list context, returns an array of headers. In scalar context,
 returns headers for shoving in a mail message after encoding using
 encode_headers.
 
+=head3 options
+
 =over
 
 =item queue_file -- the queue file which will generate this set of
@@ -123,6 +127,37 @@ passed through.
 
 =back
 
+=head3 default headers
+
+=over
+
+=item X-Loop -- set to the maintainer e-mail
+
+=item From -- set to the maintainer e-mail
+
+=item To -- set to Unknown recipients
+
+=item Subject -- set to Unknown subject
+
+=item Message-ID -- set appropriately (see code)
+
+=item Precedence -- set to bulk
+
+=item References -- set to the full set of message ids that are known
+(from data and the msgid option)
+
+=item In-Reply-To -- set to msg id or the msgid from data
+
+=item X-Project-PR-Message -- set to pr_msg with the bug number appended
+
+=item X-Project-PR-Package -- set to the package of the bug
+
+=item X-Project-PR-Keywords -- set to the keywords of the bug
+
+=item X-Project-PR-Source -- set to the source of the bug
+
+=back
+
 =cut
 
 sub default_headers {
@@ -203,7 +238,7 @@ sub default_headers {
                $default_header{"X-$config{project}-PR-Source"} = $1;
            }
            else {
-               my $pkg_src = getpkgsrc();
+               my $pkg_src = Debbugs::Packages::getpkgsrc();
                $default_header{"X-$config{project}-PR-Source"} = $pkg_src->{$param{data}{package}};
            }
        }