Отправка почты биллингом в Linux

Ответить
Abram
Сообщения: 157
Зарегистрирован: Чт мар 26, 2009 11:31 am
Контактная информация:

Отправка почты биллингом в Linux

Сообщение Abram »

Каким образом ABillS отсылает почту?
Получаю отлуп от sendmail:

Код: Выделить всё

A message that you sent using the -t command line option contained no
addresses that were not also on the command line, and were therefore
suppressed. This left no recipient addresses, and so no delivery could
be attempted.

------ This is a copy of your message, including all the headers. ------
Дальше поля To: и From: заполнены.

ran
Сообщения: 2298
Зарегистрирован: Вс окт 21, 2007 2:29 pm

Re: Отправка почты биллингом в Linux

Сообщение ran »

Каким образом ABillS отсылает почту?

Код: Выделить всё

#********************************************************************
# sendmail($from, $to, $subject, $message, $charset, $priority)
# MAil Priorities:
#
#
#
#
#********************************************************************
sub sendmail {
  my ($from, $to, $subject, $message, $charset, $priority, $attr) = @_;
  my $SENDMAIL = (defined($attr->{SENDMAIL_PATH})) ? $attr->{SENDMAIL_PATH} : '/usr/sbin/sendmail';

  if ($attr->{TEST}) {
    print "To: $to\n";
    print "From: $from\n";
    print "Content-Type: text/plain; charset=$charset\n";
    print "X-Priority: $priority\n" if ($priority ne '');
    print "Subject: $subject \n\n";
    print "$message";
    return 0;
   }

  open(MAIL, "| $SENDMAIL -t $to") || die "Can't open file '$SENDMAIL' $!\n";
    print MAIL "To: $to\n";
    print MAIL "From: $from\n";
    print MAIL "Content-Type: text/plain; charset=$charset\n";
    print MAIL "X-Priority: $priority\n" if ($priority ne '');
    print MAIL "Subject: $subject \n\n";
    print MAIL "$message";
  close(MAIL);

  return 0;
}
Любой тупик - это тщательно замаскированный выход.

Ответить