Page 1 of 1

SMTP with PHP

Posted: Thu Jun 06, 2002 8:27 am
by larrytech
Hello,
I use apache with sendmail at the moment, but it is limited to 20 sends in one go. I am trying to do a newsletter, and am wondering if it is possible to use the mail() function but send through an smtp server. I don't have access to php.ini, so I am hoping it can be done on the page itself.
Does anyone have any ideas?
Larry

Posted: Thu Jun 06, 2002 8:43 am
by Wandrer
SMTP Class is a PHP class to enable you to send email direct through an smtp server. Currently supports all basic commands; HELO, EHLO, MAIL, RCPT, DATA. Also supports the AUTH LOGIN (basic authentication).

http://www.hotscripts.com/Detailed/12246.html

Posted: Thu Jun 06, 2002 9:51 am
by mikeq
Just try using the mail() function in a php script

<?
$Success = mail("to@someone.com", "My Subject", "My Message");

if ($Success){
print "It Works!!!";
}
else{
print "Oops!!";
}

?>

If it works then you don't need to do anything else.

Mike

mail() doesn't work, pl. help;

Posted: Thu Jun 06, 2002 12:39 pm
by nagi
I'm using
mail("me@here.us","stuff","whatever");
in a .php page and am running IIS on Windows2000Professional.
I get
"Server Error in C:..\..\mail.php on line nn"

What am I doing wrong?

TIA

Posted: Thu Jun 06, 2002 1:17 pm
by twigletmac
Is the SMTP server set correctly in the php.ini file?

Mac

Posted: Thu Jun 06, 2002 1:21 pm
by larrytech
Thanks for this. I have downloaded the file from the link and will try it soon. I can already use mail(), but if more than 20 messages are sent in 10mins (i think) it disables for 24 hours. So SMTP is a better path.
Thanks!
Larry