Pear Mail with special SMTP settings

A

Anonymous

Guest
Hi,

I am trying to send an email thrue PEAR Mail v1.1.9.
My problem is that I have to login on my SMTP server... I did this, but I never recieved the email when I check my webmail, but neither did I get a error message when sending any mail.

I tried changing the smtp address to a invalid smtp address, no error there either.

What can I do to fix this problem?

My code:
Code:
	set_include_path("PEAR");
	include("Mail.php");

	$recipients = array('To' => 'Paul.Peelen@bredband.net',
                    'Bcc' => '$bcc',
                    'Cc' => '$cc');

	$headers["From"]    = "Blabla <bla@ratemydekstop.net>";
	$headers["To"]      = "Paul.Peelen@bredband.net";
	$headers["Subject"]	= $subject;

	$params["host"]		= "relay.bostream.com";
	$params["port"]		= "25";
	$params["auth"]		= true;
	$params["username"] = "MYUSERNAME";
	$params["password"] = "MYPASSWORD";

	error_reporting(E_ALL);

	// Create the mail object using the Mail::factory method
	$mail_object =& Mail::factory("smtp", $params);

	$mail_object->send($recipients, $headers, $message)or die("NOOO!");

Best regards,
Paul Peelen
 
Halloy!

Anyways..the thing is that pear mail class is jsut a peace of crap..hehe
I will suggest that you use PHPMailer instead as it has a full support for authentication, both SMTP auth and POP before SMTP

Why reinvent the wheel?
 
Alexei Kubarev said:
Halloy!

Anyways..the thing is that pear mail class is jsut a peace of crap..hehe
I will suggest that you use PHPMailer instead as it has a full support for authentication, both SMTP auth and POP before SMTP

Why reinvent the wheel?

Thnx m8.

// Paul
 
also here's a smtp mail function

http://expert.no-ip.org/?free=smtp_mail&func
 
Back
Top