changing my mail function

From: Date: Mon, 25 Apr 2005 20:45:23 +0000
Subject: changing my mail function
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-18951@lists.php.net to get a copy of this message
I am using phpnuke and in order to get it sent from my isp's webserver I'm suppose to re-do my mail function using PEAR. The history of the problem is here http://www.karakas-online.de/forum/viewtopic.php?t=2463 Code is : #!/usr/bin/php <?php function mymail($username, $user_email, $subject, $message, $from, $host, $port, $username, $user_password) { // This is the Mail.php file from PEAR. include("Mail.php"); $recipients = $username; $headers["From"] = $from; $headers["To"] = $user_email; $headers["Subject"] = $subject; $body = $message; $params["host"] = $host; $params["port"] = $port; $params["auth"] = true; $params["username"] = $username; $params["password"] = $user_password; // Create the mail object using the Mail::factory method $mail_object =& Mail::factory("smtp", $params); $mail_object->send($recipients, $headers, $body); } mymail("hatadmin", "reciever@isp.net", "testsubject", "testmessage", $from, "smtp.isp.net", "25", "hatadmin", "mypass"); ?> I created a script to see if I could get the email to send. hatadmin is the username I use to login to my isp webserver. reciever@isp.net is the email I wanna send it to smtp.isp.net is my isp's webserver name' mypass is the password I use to login to the mailserver. I gave the script the appropriate permissions and I ran it. It ran and I got no error messages but the email was never sent to the recieving email. I know when I used phpbb2 before that I didn't need to fill in the password section of the configuartion to get confirmation emails sent. So I took out the password in the call to mymail and in the mymail function but that still didn't work. I'm kinda running out of ideas on how to solve this problemo. Any suggestiong would be appreciated.

« previous php.pear.general (#18951) next »