MIOLO20
Carregando...
Procurando...
Nenhuma entrada encontrada
class.smtp.php
Ir para a documentação deste ficheiro.
1<?php
3// SMTP - PHP SMTP class
4//
5// Version 1.02
6//
7// Define an SMTP class that can be used to connect
8// and communicate with any SMTP server. It implements
9// all the SMTP functions defined in RFC821 except TURN.
10//
11// Author: Chris Ryan
12//
13// License: LGPL, see LICENSE
15
24class SMTP
25{
30 var $SMTP_PORT = 25;
31
36 var $CRLF = "\r\n";
37
42 var $do_debug; # the level of debug to perform
43
47 var $smtp_conn; # the socket to the server
48 var $error; # error if any on the last call
49 var $helo_rply; # the reply the server sent to us for HELO
57 function SMTP()
58 {
60 }
61
62 function __construct()
63 {
64 $this->smtp_conn = 0;
65 $this->error = null;
66 $this->helo_rply = null;
67
68 $this->do_debug = 0;
69 }
70
71 /*************************************************************
72 * CONNECTION FUNCTIONS *
73 ***********************************************************/
74
88 function Connect($host, $port = 0, $tval = 30)
89 {
90 # set the error val to null so there is no confusion
91 $this->error = null;
92
93 # make sure we are __not__ connected
94 if ($this->connected())
95 {
96 # ok we are connected! what should we do?
97 # for now we will just give an error saying we
98 # are already connected
99 $this->error = array("error" => "Already connected to a server");
100 return false;
101 }
102
103 if (empty($port))
104 {
105 $port = $this->SMTP_PORT;
106 }
107
108 #connect to the smtp server
109 $this->smtp_conn = fsockopen($host, # the host of the server
110 $port, # the port to use
111 $errno, # error number if any
112 $errstr, # error message if any
113 $tval); # give up after ? secs
114 # verify we connected properly
115 if (empty($this->smtp_conn))
116 {
117 $this->error = array
118 (
119 "error" => "Failed to connect to server",
120 "errno" => $errno,
121 "errstr" => $errstr
122 );
123
124 if ($this->do_debug >= 1)
125 {
126 echo "SMTP -> ERROR: " . $this->error["error"] . ": $errstr ($errno)" . $this->CRLF;
127 }
128
129 return false;
130 }
131
132 # sometimes the SMTP server takes a little longer to respond
133 # so we will give it a longer timeout for the first read
134 // Windows still does not have support for this timeout function
135 if (substr(PHP_OS, 0, 3) != "WIN")
136 socket_set_timeout($this->smtp_conn, $tval, 0);
137
138 # get any announcement stuff
139 $announce = $this->get_lines();
140
141 # set the timeout of any socket functions at 1/10 of a second
142 //if(function_exists("socket_set_timeout"))
143 // socket_set_timeout($this->smtp_conn, 0, 100000);
144
145 if ($this->do_debug >= 2)
146 {
147 echo "SMTP -> FROM SERVER:" . $this->CRLF . $announce;
148 }
149
150 return true;
151 }
152
159 function Authenticate($username, $password)
160 {
161 // Start authentication
162 fputs($this->smtp_conn, "AUTH LOGIN" . $this->CRLF);
163
164 $rply = $this->get_lines();
165 $code = substr($rply, 0, 3);
166
167 if ($code != 334)
168 {
169 $this->error = array
170 (
171 "error" => "AUTH not accepted from server",
172 "smtp_code" => $code,
173 "smtp_msg" => substr($rply, 4)
174 );
175
176 if ($this->do_debug >= 1)
177 {
178 echo "SMTP -> ERROR: " . $this->error["error"] . ": " . $rply . $this->CRLF;
179 }
180
181 return false;
182 }
183
184 // Send encoded username
185 fputs($this->smtp_conn, base64_encode($username) . $this->CRLF);
186
187 $rply = $this->get_lines();
188 $code = substr($rply, 0, 3);
189
190 if ($code != 334)
191 {
192 $this->error = array
193 (
194 "error" => "Username not accepted from server",
195 "smtp_code" => $code,
196 "smtp_msg" => substr($rply, 4)
197 );
198
199 if ($this->do_debug >= 1)
200 {
201 echo "SMTP -> ERROR: " . $this->error["error"] . ": " . $rply . $this->CRLF;
202 }
203
204 return false;
205 }
206
207 // Send encoded password
208 fputs($this->smtp_conn, base64_encode($password) . $this->CRLF);
209
210 $rply = $this->get_lines();
211 $code = substr($rply, 0, 3);
212
213 if ($code != 235)
214 {
215 $this->error = array
216 (
217 "error" => "Password not accepted from server",
218 "smtp_code" => $code,
219 "smtp_msg" => substr($rply, 4)
220 );
221
222 if ($this->do_debug >= 1)
223 {
224 echo "SMTP -> ERROR: " . $this->error["error"] . ": " . $rply . $this->CRLF;
225 }
226
227 return false;
228 }
229
230 return true;
231 }
232
238 function Connected()
239 {
240 if (!empty($this->smtp_conn))
241 {
242 $sock_status = socket_get_status($this->smtp_conn);
243
244 if ($sock_status["eof"])
245 {
246 # hmm this is an odd situation... the socket is
247 # valid but we aren't connected anymore
248 if ($this->do_debug >= 1)
249 {
250 echo "SMTP -> NOTICE:" . $this->CRLF . "EOF caught while checking if connected";
251 }
252
253 $this->Close();
254 return false;
255 }
256
257 return true; # everything looks good
258 }
259
260 return false;
261 }
262
270 function Close()
271 {
272 $this->error = null; # so there is no confusion
273 $this->helo_rply = null;
274
275 if (!empty($this->smtp_conn))
276 {
277 # close the connection and cleanup
278 fclose ($this->smtp_conn);
279 $this->smtp_conn = 0;
280 }
281 }
282
283 /***************************************************************
284 * SMTP COMMANDS *
285 *************************************************************/
286
306 function Data($msg_data)
307 {
308 $this->error = null; # so no confusion is caused
309
310 if (!$this->connected())
311 {
312 $this->error = array("error" => "Called Data() without being connected");
313 return false;
314 }
315
316 fputs($this->smtp_conn, "DATA" . $this->CRLF);
317
318 $rply = $this->get_lines();
319 $code = substr($rply, 0, 3);
320
321 if ($this->do_debug >= 2)
322 {
323 echo "SMTP -> FROM SERVER:" . $this->CRLF . $rply;
324 }
325
326 if ($code != 354)
327 {
328 $this->error = array
329 (
330 "error" => "DATA command not accepted from server",
331 "smtp_code" => $code,
332 "smtp_msg" => substr($rply, 4)
333 );
334
335 if ($this->do_debug >= 1)
336 {
337 echo "SMTP -> ERROR: " . $this->error["error"] . ": " . $rply . $this->CRLF;
338 }
339
340 return false;
341 }
342
343 # the server is ready to accept data!
344 # according to rfc 821 we should not send more than 1000
345 # including the CRLF
346 # characters on a single line so we will break the data up
347 # into lines by \r and/or \n then if needed we will break
348 # each of those into smaller lines to fit within the limit.
349 # in addition we will be looking for lines that start with
350 # a period '.' and append and additional period '.' to that
351 # line. NOTE: this does not count towards are limit.
352
353 # normalize the line breaks so we know the explode works
354 $msg_data = str_replace("\r\n", "\n", $msg_data);
355 $msg_data = str_replace("\r", "\n", $msg_data);
356 $lines = explode("\n", $msg_data);
357
358 # we need to find a good way to determine is headers are
359 # in the msg_data or if it is a straight msg body
360 # currently I'm assuming rfc 822 definitions of msg headers
361 # and if the first field of the first line (':' sperated)
362 # does not contain a space then it _should_ be a header
363 # and we can process all lines before a blank "" line as
364 # headers.
365 $field = substr($lines[0], 0, strpos($lines[0], ":"));
366 $in_headers = false;
367
368 if (!empty($field) && !strstr($field, " "))
369 {
370 $in_headers = true;
371 }
372
373 $max_line_length = 998; # used below; set here for ease in change
374
375 while (list(, $line) = @each($lines))
376 {
377 $lines_out = null;
378
379 if ($line == "" && $in_headers)
380 {
381 $in_headers = false;
382 }
383
384 # ok we need to break this line up into several
385 # smaller lines
386 while (strlen($line) > $max_line_length)
387 {
388 $pos = strrpos(substr($line, 0, $max_line_length), " ");
389 $lines_out[] = substr($line, 0, $pos);
390 $line = substr($line, $pos + 1);
391
392 # if we are processing headers we need to
393 # add a LWSP-char to the front of the new line
394 # rfc 822 on long msg headers
395 if ($in_headers)
396 {
397 $line = "\t" . $line;
398 }
399 }
400
401 $lines_out[] = $line;
402
403 # now send the lines to the server
404 while (list(, $line_out) = @each($lines_out))
405 {
406 if (strlen($line_out) > 0)
407 {
408 if (substr($line_out, 0, 1) == ".")
409 {
410 $line_out = "." . $line_out;
411 }
412 }
413
414 fputs($this->smtp_conn, $line_out . $this->CRLF);
415 }
416 }
417
418 # ok all the message data has been sent so lets get this
419 # over with aleady
420 fputs($this->smtp_conn, $this->CRLF . "." . $this->CRLF);
421
422 $rply = $this->get_lines();
423 $code = substr($rply, 0, 3);
424
425 if ($this->do_debug >= 2)
426 {
427 echo "SMTP -> FROM SERVER:" . $this->CRLF . $rply;
428 }
429
430 if ($code != 250)
431 {
432 $this->error = array
433 (
434 "error" => "DATA not accepted from server",
435 "smtp_code" => $code,
436 "smtp_msg" => substr($rply, 4)
437 );
438
439 if ($this->do_debug >= 1)
440 {
441 echo "SMTP -> ERROR: " . $this->error["error"] . ": " . $rply . $this->CRLF;
442 }
443
444 return false;
445 }
446
447 return true;
448 }
449
466 function Expand($name)
467 {
468 $this->error = null; # so no confusion is caused
469
470 if (!$this->connected())
471 {
472 $this->error = array("error" => "Called Expand() without being connected");
473 return false;
474 }
475
476 fputs($this->smtp_conn, "EXPN " . $name . $this->CRLF);
477
478 $rply = $this->get_lines();
479 $code = substr($rply, 0, 3);
480
481 if ($this->do_debug >= 2)
482 {
483 echo "SMTP -> FROM SERVER:" . $this->CRLF . $rply;
484 }
485
486 if ($code != 250)
487 {
488 $this->error = array
489 (
490 "error" => "EXPN not accepted from server",
491 "smtp_code" => $code,
492 "smtp_msg" => substr($rply, 4)
493 );
494
495 if ($this->do_debug >= 1)
496 {
497 echo "SMTP -> ERROR: " . $this->error["error"] . ": " . $rply . $this->CRLF;
498 }
499
500 return false;
501 }
502
503 # parse the reply and place in our array to return to user
504 $entries = explode($this->CRLF, $rply);
505
506 while (list(, $l) = @each($entries))
507 {
508 $list[] = substr($l, 4);
509 }
510
511 return $list;
512 }
513
526 function Hello($host = "")
527 {
528 $this->error = null; # so no confusion is caused
529
530 if (!$this->connected())
531 {
532 $this->error = array("error" => "Called Hello() without being connected");
533 return false;
534 }
535
536 # if a hostname for the HELO wasn't specified determine
537 # a suitable one to send
538 if (empty($host))
539 {
540 # we need to determine some sort of appopiate default
541 # to send to the server
542 $host = "localhost";
543 }
544
545 // Send extended hello first (RFC 2821)
546 if (!$this->SendHello("EHLO", $host))
547 {
548 if (!$this->SendHello("HELO", $host))
549 return false;
550 }
551
552 return true;
553 }
554
560 function SendHello($hello, $host)
561 {
562 fputs($this->smtp_conn, $hello . " " . $host . $this->CRLF);
563
564 $rply = $this->get_lines();
565 $code = substr($rply, 0, 3);
566
567 if ($this->do_debug >= 2)
568 {
569 echo "SMTP -> FROM SERVER: " . $this->CRLF . $rply;
570 }
571
572 if ($code != 250)
573 {
574 $this->error = array
575 (
576 "error" => $hello . " not accepted from server",
577 "smtp_code" => $code,
578 "smtp_msg" => substr($rply, 4)
579 );
580
581 if ($this->do_debug >= 1)
582 {
583 echo "SMTP -> ERROR: " . $this->error["error"] . ": " . $rply . $this->CRLF;
584 }
585
586 return false;
587 }
588
589 $this->helo_rply = $rply;
590
591 return true;
592 }
593
609 function Help($keyword = "")
610 {
611 $this->error = null; # to avoid confusion
612
613 if (!$this->connected())
614 {
615 $this->error = array("error" => "Called Help() without being connected");
616 return false;
617 }
618
619 $extra = "";
620
621 if (!empty($keyword))
622 {
623 $extra = " " . $keyword;
624 }
625
626 fputs($this->smtp_conn, "HELP" . $extra . $this->CRLF);
627
628 $rply = $this->get_lines();
629 $code = substr($rply, 0, 3);
630
631 if ($this->do_debug >= 2)
632 {
633 echo "SMTP -> FROM SERVER:" . $this->CRLF . $rply;
634 }
635
636 if ($code != 211 && $code != 214)
637 {
638 $this->error = array
639 (
640 "error" => "HELP not accepted from server",
641 "smtp_code" => $code,
642 "smtp_msg" => substr($rply, 4)
643 );
644
645 if ($this->do_debug >= 1)
646 {
647 echo "SMTP -> ERROR: " . $this->error["error"] . ": " . $rply . $this->CRLF;
648 }
649
650 return false;
651 }
652
653 return $rply;
654 }
655
670 function Mail($from)
671 {
672 $this->error = null; # so no confusion is caused
673
674 if (!$this->connected())
675 {
676 $this->error = array("error" => "Called Mail() without being connected");
677 return false;
678 }
679
680 fputs($this->smtp_conn, "MAIL FROM:<" . $from . ">" . $this->CRLF);
681
682 $rply = $this->get_lines();
683 $code = substr($rply, 0, 3);
684
685 if ($this->do_debug >= 2)
686 {
687 echo "SMTP -> FROM SERVER:" . $this->CRLF . $rply;
688 }
689
690 if ($code != 250)
691 {
692 $this->error = array
693 (
694 "error" => "MAIL not accepted from server",
695 "smtp_code" => $code,
696 "smtp_msg" => substr($rply, 4)
697 );
698
699 if ($this->do_debug >= 1)
700 {
701 echo "SMTP -> ERROR: " . $this->error["error"] . ": " . $rply . $this->CRLF;
702 }
703
704 return false;
705 }
706
707 return true;
708 }
709
720 function Noop()
721 {
722 $this->error = null; # so no confusion is caused
723
724 if (!$this->connected())
725 {
726 $this->error = array("error" => "Called Noop() without being connected");
727 return false;
728 }
729
730 fputs($this->smtp_conn, "NOOP" . $this->CRLF);
731
732 $rply = $this->get_lines();
733 $code = substr($rply, 0, 3);
734
735 if ($this->do_debug >= 2)
736 {
737 echo "SMTP -> FROM SERVER:" . $this->CRLF . $rply;
738 }
739
740 if ($code != 250)
741 {
742 $this->error = array
743 (
744 "error" => "NOOP not accepted from server",
745 "smtp_code" => $code,
746 "smtp_msg" => substr($rply, 4)
747 );
748
749 if ($this->do_debug >= 1)
750 {
751 echo "SMTP -> ERROR: " . $this->error["error"] . ": " . $rply . $this->CRLF;
752 }
753
754 return false;
755 }
756
757 return true;
758 }
759
771 function Quit($close_on_error = true)
772 {
773 $this->error = null; # so there is no confusion
774
775 if (!$this->connected())
776 {
777 $this->error = array("error" => "Called Quit() without being connected");
778 return false;
779 }
780
781 # send the quit command to the server
782 fputs($this->smtp_conn, "quit" . $this->CRLF);
783
784 # get any good-bye messages
785 $byemsg = $this->get_lines();
786
787 if ($this->do_debug >= 2)
788 {
789 echo "SMTP -> FROM SERVER:" . $this->CRLF . $byemsg;
790 }
791
792 $rval = true;
793 $e = null;
794
795 $code = substr($byemsg, 0, 3);
796
797 if ($code != 221)
798 {
799 # use e as a tmp var cause Close will overwrite $this->error
800 $e = array
801 (
802 "error" => "SMTP server rejected quit command",
803 "smtp_code" => $code,
804 "smtp_rply" => substr($byemsg, 4)
805 );
806
807 $rval = false;
808
809 if ($this->do_debug >= 1)
810 {
811 echo "SMTP -> ERROR: " . $e["error"] . ": " . $byemsg . $this->CRLF;
812 }
813 }
814
815 if (empty($e) || $close_on_error)
816 {
817 $this->Close();
818 }
819
820 return $rval;
821 }
822
835 function Recipient($to)
836 {
837 $this->error = null; # so no confusion is caused
838
839 if (!$this->connected())
840 {
841 $this->error = array("error" => "Called Recipient() without being connected");
842 return false;
843 }
844
845 fputs($this->smtp_conn, "RCPT TO:<" . $to . ">" . $this->CRLF);
846
847 $rply = $this->get_lines();
848 $code = substr($rply, 0, 3);
849
850 if ($this->do_debug >= 2)
851 {
852 echo "SMTP -> FROM SERVER:" . $this->CRLF . $rply;
853 }
854
855 if ($code != 250 && $code != 251)
856 {
857 $this->error = array
858 (
859 "error" => "RCPT not accepted from server",
860 "smtp_code" => $code,
861 "smtp_msg" => substr($rply, 4)
862 );
863
864 if ($this->do_debug >= 1)
865 {
866 echo "SMTP -> ERROR: " . $this->error["error"] . ": " . $rply . $this->CRLF;
867 }
868
869 return false;
870 }
871
872 return true;
873 }
874
887 function Reset()
888 {
889 $this->error = null; # so no confusion is caused
890
891 if (!$this->connected())
892 {
893 $this->error = array("error" => "Called Reset() without being connected");
894 return false;
895 }
896
897 fputs($this->smtp_conn, "RSET" . $this->CRLF);
898
899 $rply = $this->get_lines();
900 $code = substr($rply, 0, 3);
901
902 if ($this->do_debug >= 2)
903 {
904 echo "SMTP -> FROM SERVER:" . $this->CRLF . $rply;
905 }
906
907 if ($code != 250)
908 {
909 $this->error = array
910 (
911 "error" => "RSET failed",
912 "smtp_code" => $code,
913 "smtp_msg" => substr($rply, 4)
914 );
915
916 if ($this->do_debug >= 1)
917 {
918 echo "SMTP -> ERROR: " . $this->error["error"] . ": " . $rply . $this->CRLF;
919 }
920
921 return false;
922 }
923
924 return true;
925 }
926
943 function Send($from)
944 {
945 $this->error = null; # so no confusion is caused
946
947 if (!$this->connected())
948 {
949 $this->error = array("error" => "Called Send() without being connected");
950 return false;
951 }
952
953 fputs($this->smtp_conn, "SEND FROM:" . $from . $this->CRLF);
954
955 $rply = $this->get_lines();
956 $code = substr($rply, 0, 3);
957
958 if ($this->do_debug >= 2)
959 {
960 echo "SMTP -> FROM SERVER:" . $this->CRLF . $rply;
961 }
962
963 if ($code != 250)
964 {
965 $this->error = array
966 (
967 "error" => "SEND not accepted from server",
968 "smtp_code" => $code,
969 "smtp_msg" => substr($rply, 4)
970 );
971
972 if ($this->do_debug >= 1)
973 {
974 echo "SMTP -> ERROR: " . $this->error["error"] . ": " . $rply . $this->CRLF;
975 }
976
977 return false;
978 }
979
980 return true;
981 }
982
999 function SendAndMail($from)
1000 {
1001 $this->error = null; # so no confusion is caused
1002
1003 if (!$this->connected())
1004 {
1005 $this->error = array("error" => "Called SendAndMail() without being connected");
1006 return false;
1007 }
1008
1009 fputs($this->smtp_conn, "SAML FROM:" . $from . $this->CRLF);
1010
1011 $rply = $this->get_lines();
1012 $code = substr($rply, 0, 3);
1013
1014 if ($this->do_debug >= 2)
1015 {
1016 echo "SMTP -> FROM SERVER:" . $this->CRLF . $rply;
1017 }
1018
1019 if ($code != 250)
1020 {
1021 $this->error = array
1022 (
1023 "error" => "SAML not accepted from server",
1024 "smtp_code" => $code,
1025 "smtp_msg" => substr($rply, 4)
1026 );
1027
1028 if ($this->do_debug >= 1)
1029 {
1030 echo "SMTP -> ERROR: " . $this->error["error"] . ": " . $rply . $this->CRLF;
1031 }
1032
1033 return false;
1034 }
1035
1036 return true;
1037 }
1038
1055 function SendOrMail($from)
1056 {
1057 $this->error = null; # so no confusion is caused
1058
1059 if (!$this->connected())
1060 {
1061 $this->error = array("error" => "Called SendOrMail() without being connected");
1062 return false;
1063 }
1064
1065 fputs($this->smtp_conn, "SOML FROM:" . $from . $this->CRLF);
1066
1067 $rply = $this->get_lines();
1068 $code = substr($rply, 0, 3);
1069
1070 if ($this->do_debug >= 2)
1071 {
1072 echo "SMTP -> FROM SERVER:" . $this->CRLF . $rply;
1073 }
1074
1075 if ($code != 250)
1076 {
1077 $this->error = array
1078 (
1079 "error" => "SOML not accepted from server",
1080 "smtp_code" => $code,
1081 "smtp_msg" => substr($rply, 4)
1082 );
1083
1084 if ($this->do_debug >= 1)
1085 {
1086 echo "SMTP -> ERROR: " . $this->error["error"] . ": " . $rply . $this->CRLF;
1087 }
1088
1089 return false;
1090 }
1091
1092 return true;
1093 }
1094
1108 function Turn()
1109 {
1110 $this->error = array("error" => "This method, TURN, of the SMTP " . "is not implemented");
1111
1112 if ($this->do_debug >= 1)
1113 {
1114 echo "SMTP -> NOTICE: " . $this->error["error"] . $this->CRLF;
1115 }
1116
1117 return false;
1118 }
1119
1133 function Verify($name)
1134 {
1135 $this->error = null; # so no confusion is caused
1136
1137 if (!$this->connected())
1138 {
1139 $this->error = array("error" => "Called Verify() without being connected");
1140 return false;
1141 }
1142
1143 fputs($this->smtp_conn, "VRFY " . $name . $this->CRLF);
1144
1145 $rply = $this->get_lines();
1146 $code = substr($rply, 0, 3);
1147
1148 if ($this->do_debug >= 2)
1149 {
1150 echo "SMTP -> FROM SERVER:" . $this->CRLF . $rply;
1151 }
1152
1153 if ($code != 250 && $code != 251)
1154 {
1155 $this->error = array
1156 (
1157 "error" => "VRFY failed on name '$name'",
1158 "smtp_code" => $code,
1159 "smtp_msg" => substr($rply, 4)
1160 );
1161
1162 if ($this->do_debug >= 1)
1163 {
1164 echo "SMTP -> ERROR: " . $this->error["error"] . ": " . $rply . $this->CRLF;
1165 }
1166
1167 return false;
1168 }
1169
1170 return $rply;
1171 }
1172
1173 /*******************************************************************
1174 * INTERNAL FUNCTIONS *
1175 ******************************************************************/
1176
1186 function get_lines()
1187 {
1188 $data = "";
1189
1190 while ($str = fgets($this->smtp_conn, 515))
1191 {
1192 if ($this->do_debug >= 4)
1193 {
1194 echo "SMTP -> get_lines(): \$data was \"$data\"" . $this->CRLF;
1195 echo "SMTP -> get_lines(): \$str is \"$str\"" . $this->CRLF;
1196 }
1197
1198 $data .= $str;
1199
1200 if ($this->do_debug >= 4)
1201 {
1202 echo "SMTP -> get_lines(): \$data is \"$data\"" . $this->CRLF;
1203 }
1204
1205 # if the 4th character is a space then we are done reading
1206 # so just break the loop
1207 if (substr($str, 3, 1) == " ")
1208 {
1209 break;
1210 }
1211 }
1212
1213 return $data;
1214 }
1215}
1216?>
Quit($close_on_error=true)
Definição class.smtp.php:771
Connected()
Definição class.smtp.php:238
__construct()
Definição class.smtp.php:62
$do_debug
Definição class.smtp.php:42
$smtp_conn
Definição class.smtp.php:47
Noop()
Definição class.smtp.php:720
Verify($name)
SMTP()
Definição class.smtp.php:57
Close()
Definição class.smtp.php:270
SendOrMail($from)
get_lines()
Expand($name)
Definição class.smtp.php:466
Help($keyword="")
Definição class.smtp.php:609
Mail($from)
Definição class.smtp.php:670
Connect($host, $port=0, $tval=30)
Definição class.smtp.php:88
Recipient($to)
Definição class.smtp.php:835
SendAndMail($from)
Definição class.smtp.php:999
SendHello($hello, $host)
Definição class.smtp.php:560
Send($from)
Definição class.smtp.php:943
$helo_rply
Definição class.smtp.php:49
Data($msg_data)
Definição class.smtp.php:306
Hello($host="")
Definição class.smtp.php:526
Reset()
Definição class.smtp.php:887
$SMTP_PORT
Definição class.smtp.php:30
Authenticate($username, $password)
Definição class.smtp.php:159