Thread: Mail()

  1. No Profile Picture
    Devshed Newbie (0 - 499 posts)

    I'm pretty new to php. I've got a problem with the mail function. I can't get it to work. The rest of my php on the page works fine but the mail command doesn't send anything at all..

    here's my code:

    $date_mailed = date("D. F d, Y h:i:s a");
    $subject = trim($subject);
    mail("", $subject , $message);

    Any help would be appreciated!

  2. #2
  3. No Profile Picture
    Devshed Newbie (0 - 499 posts)
    Your PHP code looks fine. I suspect you have a problem with your server's mail system.

    Are you running Unix or Windows?

    PHP doesn't have the ability to actually send the mail - it simply passes it on to your system's MTA (Mail Transfer Agent). If your MTA isn't configured properly, no mail will go out.
  4. #3
  5. No Profile Picture
    Devshed Newbie (0 - 499 posts)
    I want to send mail from a MTA that's not on my local computer. The mail()-function will just try to send from my local computer. How do I get a connection to send from another computer?
    (If it matters, I'm running an Apache in Windows and I want to send from a LINUX-machine.)

Similar Threads

  1. Problem sending HTML mail to Outlook Express with mail()
    By xangelusx in forum PHP Development
    Replies: 16
    Last Post: March 8th, 2006, 06:22 AM
  2. Help with script
    By akastarlight in forum Perl Programming
    Replies: 1
    Last Post: February 6th, 2004, 06:55 AM
  3. mail() not working with ISP's mail server
    By wjones8050 in forum PHP Development
    Replies: 2
    Last Post: January 9th, 2004, 02:47 PM
  4. Replies: 5
    Last Post: May 17th, 2003, 08:56 PM
  5. Problems with MIME type in mail headers
    By hccfilms in forum PHP Development
    Replies: 1
    Last Post: October 14th, 2002, 01:54 AM

IMN logo majestic logo threadwatch logo seochat tools logo