Child pages
  • Correct SMTP-Mailing with PHP

Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Added note about php-mail on ITEG servers



# $params["host"] - The server to connect. Default is localhost

# $params["port"] - The port to connect. Default is 25 # $params["auth"] - Whether or not to use SMTP authentication. Default is FALSE # $params["username"] - The username to use for SMTP authentication. # $params["password"] - The password to use for SMTP authentication. # $params["persist"] - Indicates whether or not the SMTP connection # should persist over multiple calls to the send() method. $recipients = array('To' => ''); $headers['From'] = ''; $headers['To'] = ''; $headers['Subject'] = "Foo topic"; $mail_object =& Mail::factory('smtp', $params); $mail_object->send($recipients, $headers, $message);


Remark: As of 2014-12-30, all web servers hosted at ITEG with PHP support also have Pear::Mail installed, as debian package php-mail.



Originally from: IBCL BLog.
Originally posted: 2006-12-20