メール送信のcgi/perlスクリプト関数です。どこかでmimeエンコードしないといけないけど。

トップperl scriptsメール送信のcgi/perlスクリプト関数

メール送信のcgi/perlスクリプト関数

メール送信のcgi/perlスクリプト関数です。どこかでmimeエンコードしないといけないけど。


sub SendMAIL
{ 
  my( $from, $to, $reply, $subject, $data ) = @_;
  
  my $send_buf='';
  $send_buf .= "From: $from¥n";
  $send_buf .= "To: $to¥n";
  $send_buf .= "Return-Path: $reply¥n";
  $send_buf .= "Subject: $subject¥n";
  $send_buf .= "Content-Type: text/plain; charset=ISO-2022-JP¥n";
  $send_buf .= "¥n";
  $send_buf .= $data;
  
  &Jcode::convert(¥$send_buf, 'jis');

  if(!open(MAIL, "| $SENDMAIL -t ")){ 
    return -1;
  }
  print MAIL $send_buf;
  close MAIL ;
  return 0;
} 

カテゴリ内の記事