To administer your WestHost account, please enter your
Domain Name or Server Manager Username.

WestHost: Professional Website Hosting Company








Results 1 to 7 of 7

Thread: mail() function

  1. #1
    Junior Member
    Join Date
    Aug 2004
    Location
    Idaho, USA
    Posts
    8

    Default mail() function

    OK I have changed the php config file and this is what php info() shows.

    sendmail_from me@localhost.com me@localhost.com
    sendmail_path /usr/sbin/sendmail /usr/sbin/sendmail

    Also this is what the config file shows.

    [mail function]
    ; For Win32 only.
    SMTP = localhost

    ; For Win32 only.
    sendmail_from = me@localhost.com

    ; For Unix only. You may supply arguments as well (default: "sendmail -t -i").
    ;sendmail_path =
    sendmail_path = /usr/sbin/sendmail

    From what I have read I just need to change the send_mail path? Is this correct?

    I've tried executing a mail script and nothing is ever sent. Any tips?

    :?:

  2. #2
    Moderator wildjokerdesign's Avatar
    Join Date
    Jun 2003
    Location
    Kansas City Mo
    Posts
    5,687

    Default

    Why did you change it from the default of "/bin/sendmail -t -i" That has always worked for my php scripts.

    Are you useing this format?
    mail($to, $subject, $message, $extra_headers);

    That is the call to mail() used int he scripts I have that work.
    Shawn
    Please remember your charity of choice: http://www.redcross.org

    Handy Links: wildjokerdesign.net | Plain Text Editors: EditPlus | Crimson

  3. #3
    Senior Member FZ's Avatar
    Join Date
    May 2003
    Location
    Johannesburg, South Africa
    Posts
    1,024

    Default

    mail() works for me and I have never edited the php.ini file. Here is what I have:

    sendmail_path = /bin/sendmail -t -i
    There are 2 things you should check:

    1) Your mailq. Log in via SSH and type mailq and press enter. Make sure it is empty.

    2) If you are trying to send mail to an e-mail address within your WestHost account, make sure that this e-mail address is set up as an e-mail/FTP account (via your Site Manager) and has been assigned a home directory. If this is not the case, do this and try again. I'm not sure if this bug still exists or not, but it is worth a shot.
    Fayez Zaheer

  4. #4
    Junior Member
    Join Date
    Aug 2004
    Location
    Idaho, USA
    Posts
    8

    Default

    Thanks for the help. I got it working!

  5. #5
    Senior Member FZ's Avatar
    Join Date
    May 2003
    Location
    Johannesburg, South Africa
    Posts
    1,024

    Default

    What fixed it for you?
    Fayez Zaheer

  6. #6
    Junior Member
    Join Date
    Sep 2004
    Location
    Austria
    Posts
    4

    Default

    Quote Originally Posted by FZ
    What fixed it for you?
    Hello FZ,

    I encountered a similar problem and found the solution in your above posting:
    2) If you are trying to send mail to an e-mail address within your WestHost account, make sure that this e-mail address is set up as an e-mail/FTP account (via your Site Manager) and has been assigned a home directory. If this is not the case, do this and try again. I'm not sure if this bug still exists or not, but it is worth a shot.
    Thanks very much for sharing your knowledge and experience!
    Best,
    Hike

  7. #7
    Senior Member FZ's Avatar
    Join Date
    May 2003
    Location
    Johannesburg, South Africa
    Posts
    1,024

    Default

    Hike, I'm glad it helped.
    Fayez Zaheer

Similar Threads

  1. Replies: 1
    Last Post: 11-22-2006, 01:56 PM
  2. Mail queue backlog suggestions - best practices?
    By ajparker in forum E-mail / FTP Management
    Replies: 6
    Last Post: 04-01-2005, 12:40 AM
  3. BCC Issue with PHP mail() function...
    By danguru in forum PHP / MySQL
    Replies: 4
    Last Post: 09-23-2004, 01:00 PM
  4. changing main mx record and php mail() function
    By gnossos in forum Domain names & DNS
    Replies: 0
    Last Post: 03-06-2004, 06:57 AM
  5. Login Errors
    By foeggy in forum PHP / MySQL
    Replies: 3
    Last Post: 01-14-2004, 03:00 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •