Jump to content

Problem With SMTP mailer !


Alfa9

Recommended Posts

Hey guys :D

 

I googled for it and I found some cool stuff(it's because I need to autentificate with username and password to my SMTP server !)

 

But the problem is evry time I find An Article about that, with some code suplied too :

For example I found this on some website :

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); 

}

 

I need to know where do they get the php.net from PEAR ??

I really need some help here  :(

Link to comment
https://forums.phpfreaks.com/topic/240651-problem-with-smtp-mailer/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.