Changeset 69 for trunk


Ignore:
Timestamp:
11/15/04 12:36:31 (20 years ago)
Author:
Kris Deugau
Message:

/trunk

Fix for mailNotify() so it works

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/cgi-bin/IPDB.pm

    r68 r69  
    7979sub mailNotify ($$$) {
    8080  my ($recip,$subj,$message) = @_;
    81   my $mailer = Net::SMTP->new("smtp.example.com", Debug => 1);
     81  my $mailer = Net::SMTP->new("smtp.example.com", Hello => "ipdb.example.com");
    8282
    8383  $mailer->mail('ipdb@example.com');
    8484  $mailer->to($recip);
    85   $mailer->data(
    86 "X-Mailer: IPDB Notify v".sprintf("%.1d",$IPDB::VERSION)."\n",
    87 "Date: ".strftime("%a, %d %b %Y %H:%M:%S %z",localtime)."\n",
    88 "Organization: Example Corp.\n",
    89 "From: \"IP Database\" <ipdb\@example.com>\n",
    90 "Subject: {IPDB} $subj\n",
    91 "X-Test: test\n",
    92 "\n$message\n"
    93 );
     85  $mailer->data("From: \"IP Database\" <ipdb\@example.com>\n",
     86        "Date: ".strftime("%a, %d %b %Y %H:%M:%S %z",localtime)."\n",
     87        "Subject: {IPDB} $subj\n",
     88        "X-Mailer: IPDB Notify v".sprintf("%.1d",$IPDB::VERSION)."\n",
     89        "Organization: Example Corp\n",
     90        "\n$message\n");
    9491  $mailer->quit;
    9592}
Note: See TracChangeset for help on using the changeset viewer.