b>邮件发送处理
下面是真正的秘密了,可要看仔细了。:)
1 function send( $to,$from,$subject,$message)
2 {
3 //连接服务器
4 $this-$#@62;lastact="connect";
5 $this-$#@62;show_debug("Connect to SMTP server : ".$this-$#@62;smtp, "out");
6 $this-$#@62;fp = fsockopen ( $this-$#@62;smtp, $this-$#@62;port );
7 if ( $this-$#@62;fp )
8 {
9 set_socket_blocking( $this-$#@62;fp, true );
10 $this-$#@62;lastmessage=fgets($this-$#@62;fp,512);
11 $this-$#@62;show_debug($this-$#@62;lastmessage, "in");
12 if (! ereg ( "^220", $this-$#@62;lastmessage ) )
13 {
14 return false;
15 }
16 else
17 {
18 $this-$#@62;lastact="HELO " . $this-$#@62;welcome . "
";
19 if(!$this-$#@62;do_command($this-$#@62;lastact, "250"))
20 {
21 fclose($this-$#@62;fp);
22 return false;
23 }
24 $this-$#@62;lastact="MAIL FROM: $from" . "
";