"Balaji Ankem" <[EMAIL PROTECTED]> wrote in message
01bc01c137e0$280b0f60$[EMAIL PROTECTED]">news:01bc01c137e0$280b0f60$[EMAIL PROTECTED]...
> Hi friends,
>     I would like to implement sending an e-mail through SMTP server.
>
> Here my SMTP server needs authentication.
>
> How to pass the username and password to SMTP server??
>

Do something similar:

$username = "foo";
$password = "bar";

$fp = fsockopen ($hostname, 110, $errno, $errstr, 30) or die("could not
connect");
fwrite($fp, "USER ".$username."\r\n");
fwrite($fp, "PASS ".$password."\r\n");

For more info about the protocol, take a look here:

http://www.cis.ohio-state.edu/cgi-bin/rfc/rfc1939.html

/ franklin



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to