Jump to content

cybernga

New Members
  • Posts

    1
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

cybernga's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hello, I'm trying to get mail() to work as intended (mail is required unfortunately). All code is written in a Linux box with a local Postfix installation that works like a charm ( can send mail through command line ). Environment: PHP Version 4.4.2-1build1 Apache 2.0 Ubuntu Linux The code is as follows : [code] <?php // The message $message = "Line 1\nLine 2\nLine 3"; // In case any of our lines are larger than 70 characters, we should use wordwrap() $message = wordwrap($message, 70); // Send if(mail('cybernga@localhost','Subject','Message')) {         print "Mail sent";     } else {         print "Mail not sent"; } ?> [/code] The above code obviously sends the mail to a local user. The weird part is that when the above code is run through the command line it works just fine, but when it's run from the browser the mail never reaches Postfix (nothing logged)... any ideas ? thank you in advance for any answers :)
×
×
  • 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.