|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
Quicky - mail() function
I've written the following code to test the mail function on my system...
PHP Code:
... and I get the following error ... Quote:
Does my server need to be configured to use this function? The PHP documentation gave me the impression that this function should work out of the box. |
|
#2
|
|||
|
|||
|
This is a stupid question, but is your computer which the script is running off of running a mail server? Because if not, I believe you need to change your configuration so that the SMTP (Windows) or sendmail_path (UNIX) variable points to the correct address of the mailserver.
Of course, if you've done that already forget everything I just said. |
|
#3
|
||||
|
||||
|
This may be it.
PHP Code:
also maybe PHP Code:
__________________
Programming is easy. It's the thinking that's hard. Search the forums before you ask your question. PHP | MySQL websites. Visit them, read them, cherish them. Read the posting rules, before you post. See if your question has been answered already. |
|
#4
|
||||
|
||||
|
Looks like I was asking the stupid question. My machine isn't running a mail server. Can you give me any pointers for where to configure SMPT to point to my mail server? I'm running XP. I've looked in the SMPT properties but I don't see a place to specifically define an address for a mail server.
Thanks |
|
#5
|
||||
|
||||
|
In your PHP.ini file
Quote:
|
|
#6
|
||||
|
||||
|
Thanks Maytricks. That's fixed my problem.
Cheers |
|
#7
|
|||
|
|||
|
You can also get rid of the action= thingy if your going to be submitting it to the same script.
i.e. <form method="post" enctype="multipart/form-data" name="form_Search"> |
![]() |
| Viewing: Dev Shed Forums > Programming Languages > PHP Development > Quicky - mail() function |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|