PDA

View Full Version : mail() function



ms425
10-15-2004, 10:50 AM
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?

:?:

wildjokerdesign
10-15-2004, 04:39 PM
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.

FZ
10-15-2004, 04:41 PM
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.

ms425
10-16-2004, 03:05 PM
Thanks for the help. I got it working!

FZ
10-16-2004, 03:09 PM
What fixed it for you?

Hike
11-23-2004, 01:43 PM
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

FZ
11-23-2004, 03:43 PM
Hike, I'm glad it helped.