Worked without a hitch. If I'd have know it was this easy, I'd of written
all that myself!  Ya-right!   LOL!

After all this made easy for me. It took me two hours to figure out to make
my smtp server name 'localhost'         Doh!

Thanks James. Someone file this for the future. Works GREAT!!


Highest Regards
Rodney Richison
918-358-1111
www.rcrnet.net
----- Original Message -----
From: "James Wright" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, October 12, 2002 9:04 PM
Subject: [sambar] yabbs {02}


Use the SMTP option; go into /Sources/Subs.pl and at line 391 find sub
sendmail.
You should be able to cut n paste this replacing the values for $mail_sender
and $mail_passwd with your own.

The only portion to change is   if ($mailtype==1) section


sub sendmail {
 my ($to, $subject, $message, $from) = @_;
 if ($mailtype==1) { use Socket; }
 if($from) { $webmaster_email = $from; }
 $to =~ s/[ \t]+/, /g;
 $webmaster_email =~ s/.*<([^\s]*?)>/$1/;
 $message =~ s/^\./\.\./gm;
 $message =~ s/\r\n/\n/g;
 $message =~ s/\n/\r\n/g;
 $message =~ s/<\/*b>//g;
 $smtp_server =~ s/^\s+//g;
 $smtp_server =~ s/\s+$//g;
 if (!$to) { return(-8); }

  if ($mailtype==1) {
$mail_sender = 'cG9zdG0K';  # base 64 encoded
$mail_passwd = 'YWh2Vl';      # base 64 encoded
  my($proto) = (getprotobyname('tcp'))[2];
  my($port) = (getservbyname('smtp', 'tcp'))[2];
  my($smtpaddr) = ($smtp_server =~
/^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/) ? pack('C4',$1,$2,$3,$4) :
(gethostbyname($smtp_server))[4];

  if (!defined($smtpaddr)) { return(-1); }
  if (!socket(MAIL, AF_INET, SOCK_STREAM, $proto)) { return(-2); }
  if (!connect(MAIL, pack('Sna4x8', AF_INET, $port, $smtpaddr))) {
return(-3); }

  my($oldfh) = select(MAIL);
  $| = 1;
  select($oldfh);

  $_ = <MAIL>;
  if (/^[45]/) {
   close(MAIL);
   return(-4);
  }

  print MAIL "helo $smtp_server\r\n";
  $_ = <MAIL>;
  if (/^[45]/) {
   close(MAIL);
   return(-5);
  }

  print MAIL "AUTH LOGIN\r\n";
  $_ = <MAIL>;
  if (/^[45]/) {
   close(MAIL);
   return(-5);
  }
  print MAIL "$mail_sender\r\n";
  $_ = <MAIL>;
  if (/^[45]/) {
   close(MAIL);
   return(-5);
  }
  print MAIL "$mail_passwd\r\n";
  $_ = <MAIL>;
  if (/^[45]/) {
   close(MAIL);
   return(-5);
  }

  print MAIL "mail from: <$webmaster_email>\r\n";
  $_ = <MAIL>;
  if (/^[45]/) {
   close(MAIL);
   return(-5);
  }

  foreach (split(/, /, $to)) {
   print MAIL "rcpt to: <$_>\r\n";
   $_ = <MAIL>;
   if (/^[45]/) {
    close(MAIL);
    return(-6);
   }
  }

  print MAIL "data\r\n";
  $_ = <MAIL>;
  if (/^[45]/) {
   close(MAIL);
   return(-5);
  }

 }

 if( $mailtype == 2 ) {

The rest is untouched.


----- Original Message -----
From: "Rodney Richison" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, October 12, 2002 5:56 PM
Subject: [sambar] yabbs {01}


> Anyone got yabbs working on thier sambar site?  How in the heck do you get
> it to send mail?  Can't even get blat to do it.
>
>
> Highest Regards
> Rodney Richison
> 918-358-1111
> www.rcrnet.net
> -------------------------------------------------------
> To unsubscribe please go to http://www.sambar.ch/list/
>
>
>
-------------------------------------------------------
To unsubscribe please go to http://www.sambar.ch/list/
-------------------------------------------------------
To unsubscribe please go to http://www.sambar.ch/list/

Reply via email to