function SMTP::get_lines in SMTP Authentication Support 5
Same name and namespace in other branches
- 7.2 smtp.transport.inc \SMTP::get_lines()
- 7 smtp.transport.inc \SMTP::get_lines()
Read in as many lines as possible either before eof or socket timeout occurs on the operation. With SMTP we can tell if we have more lines to read if the 4th character is '-' symbol. If it is a space then we don't need to read anything else. @access private
Return value
string
15 calls to SMTP::get_lines()
- SMTP::Authenticate in ./
smtp.module - Performs SMTP authentication. Must be run after running the Hello() method. Returns true if successfully authenticated. @access public
- SMTP::Connect in ./
smtp.module - Connect to the server specified on the port specified. If the port is not specified use the default SMTP_PORT. If tval is specified then a connection will try and be established with the server for that number of seconds. If tval is not specified the…
- SMTP::Data in ./
smtp.module - Issues a data command and sends the msg_data to the server finializing the mail transaction. $msg_data is the message that is to be send with the headers. Each header needs to be on a single line followed by a <CRLF> with the message headers and…
- SMTP::Expand in ./
smtp.module - Expand takes the name and asks the server to list all the people who are members of the _list_. Expand will return back and array of the result or false if an error occurs. Each value in the array returned has the format of: [ <full-name>…
- SMTP::Help in ./
smtp.module - Gets help information on the keyword specified. If the keyword is not specified then returns generic help, ussually contianing A list of keywords that help is available on. This function returns the results back to the user. It is up to the user…
File
- ./
smtp.module, line 2995 - Enables drupal to send email directly to an SMTP server using authentication. Uses the PHPMailer class by Brent R. Matzelle.
Class
- SMTP
- SMTP is rfc 821 compliant and implements all the rfc 821 SMTP commands except TURN which will always return a not implemented error. SMTP also provides some utility methods for sending mail to an SMTP server. @package PHPMailer @author Chris Ryan
Code
function get_lines() {
$data = "";
while ($str = @fgets($this->smtp_conn, 515)) {
if ($this->do_debug >= 4) {
echo "SMTP -> get_lines(): \$data was \"{$data}\"" . $this->CRLF;
echo "SMTP -> get_lines(): \$str is \"{$str}\"" . $this->CRLF;
}
$data .= $str;
if ($this->do_debug >= 4) {
echo "SMTP -> get_lines(): \$data is \"{$data}\"" . $this->CRLF;
}
# if the 4th character is a space then we are done reading
# so just break the loop
if (substr($str, 3, 1) == " ") {
break;
}
}
return $data;
}