|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
mail problem
Hello,
I am trying to set up a script that sends email. When I try to send it I get the error: Warning: Server Error in c:\program files\apache group\apache\wwwroot\sendmail.php on line 9 Does anyone have an idea of the problem. I think my php .ini is coorect but i am not sure. Thanks, Nick |
|
#2
|
|||
|
|||
|
first of all, could you please post the code that doesnt work.
secondly, id say, your server isnt set up to send emails, however, without looking at your code i could be totally wrong |
|
#3
|
|||
|
|||
|
Nick,
What's the outgoing/incoming mail server you're using? I had a similar problem a while ago... Because windows doesn't have a sendmail program, I changed the outgoing/incoming server to reflect my ISP's config. Once I made the change, it all worked fine. But as Ben said, post the code, as it may have something to do with that.
__________________
____________________________________________ Developer Shed Weekly Writer | DevArticles Forum Moderator Build Your Own KlipFolio Klip With PHP FrankManno.com - Under Construction Design Interactive Group - Under Construction |
|
#4
|
|||
|
|||
|
here is the code
sorry about not posting the code.
<html> <body> <?PHP session_start(); $message=$_POST['message']; $email=$_POST['email']; echo $message; echo $email; mail("test@yahoo.com","Testing Mail",$message,$email); ?> </body> </html also my php.ini file contains the line: SMTP=smtp.hfx.eastlink.ca the same smtp from outlook. Thanks, Nick |
|
#5
|
||||
|
||||
|
Re: here is the code
Quote:
Don't mention it... We all make that mistake! It just helps us in debugging the problem much quicker! Quote:
Okay... The problem with this is that you're sending the extra headers by using the "$email" to substitute your "From" header... Try this instead: mail("test@yahoo.com","Testing Mail", $message, "From: $email"); Let me know if that works! For more info the on the mail headers, check out this link. |
|
#6
|
|||
|
|||
|
still not working
I had tried that before and I tried it again and it still doesn't work.
The error: Warning: Server Error in c:\program files\apache group\apache\wwwroot\sendmail.php on line 9 tells me that this is a problem with the way windows 98 is handling the mail function call or the way my isp has SMTP setup. mail("test@yahoo.com","Testing Mail",$message,"From:$email"); |
|
#7
|
|||
|
|||
|
well that looks fine to me. Id have a good look in your php.ini file. There must be something wrong. Have you suplied a admin email? just look for all instances of 'mail' and make sure that its set up right
|
|
#8
|
|||
|
|||
|
here is the php.ini
[mail function]
; For Win32 only. SMTP= smtp.hfx.eastlink.ca ; for Win32 only ; For Win32 only. sendmail_from= smtp.hfx.eastlink.ca ; for Win32 only ; For Unix only. You may supply arguments as well (default: "sendmail -t -i"). ;sendmail_path= This is the part of the ini that handles the mail function and this what I have. I didn't see anything about admin email. |
|
#9
|
|||
|
|||
|
Nick,
This may sound weird, but after looking through my host's PHPINFO, I noticed something... Shouldn't the "sendmail_from" be an email address and not the smtp server? ie: sendmail_from= me@localhost.com; Just a suggestion.... Try that out! |
|
#10
|
|||
|
|||
|
shot in the dark
I think that my isp has it's smtp server guarded against
people trying to send emails without getting traced. Is it to much trouble to get an smtp server address from someone here without any protection on it. Thanks, Nick |
|
#11
|
|||
|
|||
|
got it now
Thanks everyone.
You were right Frankie about the sendmail_from. |
![]() |
| Viewing: Dev Articles Community Forums > Programming > General Programming Help > mail problem |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|