Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.