Re: SMTP authentication

From: Date: Mon, 09 Feb 2004 19:48:54 +0000
Subject: Re: SMTP authentication
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-32869@lists.php.net to get a copy of this message
I want to ask you, how I must setup my PHP.INI file, to send e-mail from my Web Site if my SMTP server requires authentication. Otherwise, I want to know if exits some kind of "public" SMTP sever that I could use.
I think you don't need to adjust your php.ini for that, just use the right params for sending the mails. Isn't somthing like this is what you need? (got it from: http://nl3.php.net/mail) Or did i get your question wrong? <? include("Mail.php"); $recipients = "mail_to@domain.mail";
$headers["From"]    = "mail_from@domain.mail";
$headers["To"]      = "mail_to@domain.mail";
$headers["Subject"] = "Test message"; $body = "TEST MESSAGE!!!"; $params["host"] = "smtp.server"; $params["port"] = "25"; $params["auth"] = true; $params["username"] = "user"; $params["password"] = "password"; // Create the mail object using the Mail::factory method $mail_object =& Mail::factory("smtp", $params); $mail_object->send($recipients, $headers, $body); ?> laters, Fedde ~= The sum of the intelligence on the planet is a constant; the population is growing. =~

« previous php.db (#32869) next »