Changeset 1134 in ProjectBuilder for devel/pb/bin/pb


Ignore:
Timestamp:
Jan 5, 2011, 3:44:01 AM (13 years ago)
Author:
Bruno Cornec
Message:
  • Fix the sendmail require bug for announce command
  • Fix warnings with param undefined for announce command
File:
1 edited

Legend:

Unmodified
Added
Removed
  • devel/pb/bin/pb

    r1132 r1134  
    617617    require DBI;
    618618    require DBD::SQLite;
    619     require Mail::SendMail;
    620619
    621620    pb_announce();
     
    30693068   
    30703069    # Preparation of headers
    3071     require Mail::Sendmail;
    3072 
    3073     my %mail = (   
     3070    eval
     3071    {
     3072        require Mail::Sendmail;
     3073        Mail::Sendmail->import();
     3074    };
     3075    if ($@) {
     3076        # Mail::Sendmail not found not sending mail !
     3077        pb_log(0,"No Mail::Sendmail module found so not sending any mail !\n");
     3078    } else {
     3079        my %mail = (   
    30743080            To          =>  $pbml->{$ENV{'PBPROJ'}},
    30753081            From        =>  $pbpackager->{$ENV{'PBPROJ'}},
     
    30793085        );
    30803086           
    3081     # Send mail
    3082     if (! sendmail(%mail)) {
    3083         if ((defined $Mail::Sendmail::error) and (defined $Mail::Sendmail::log)) {
    3084             die "Unable to send mail ($Mail::Sendmail::error): $Mail::Sendmail::log";
     3087        # Send mail
     3088        if (! sendmail(%mail)) {
     3089            if ((defined $Mail::Sendmail::error) and (defined $Mail::Sendmail::log)) {
     3090                die "Unable to send mail ($Mail::Sendmail::error): $Mail::Sendmail::log";
     3091            }
    30853092        }
    30863093    }
Note: See TracChangeset for help on using the changeset viewer.