General Programming Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingGeneral Programming Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old August 12th, 2002, 10:43 PM
nick316 nick316 is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2002
Location: N.S. Canada
Posts: 15 nick316 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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

Reply With Quote
  #2  
Old August 12th, 2002, 11:25 PM
Ben Rowe
Guest
Dev Articles Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
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

Reply With Quote
  #3  
Old August 13th, 2002, 09:21 AM
FrankieShakes FrankieShakes is offline
Frank The Tank!
Dev Articles Beginner (1000 - 1499 posts)
 
Join Date: Jun 2002
Location: Toronto, Canada
Posts: 1,246 FrankieShakes User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 8
Send a message via ICQ to FrankieShakes Send a message via MSN to FrankieShakes
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

Reply With Quote
  #4  
Old August 13th, 2002, 10:17 AM
nick316 nick316 is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2002
Location: N.S. Canada
Posts: 15 nick316 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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

Reply With Quote
  #5  
Old August 13th, 2002, 11:53 AM
FrankieShakes FrankieShakes is offline
Frank The Tank!
Dev Articles Beginner (1000 - 1499 posts)
 
Join Date: Jun 2002
Location: Toronto, Canada
Posts: 1,246 FrankieShakes User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 8
Send a message via ICQ to FrankieShakes Send a message via MSN to FrankieShakes
Re: here is the code

Quote:
Originally posted by nick316
sorry about not posting the code.


Don't mention it... We all make that mistake! It just helps us in debugging the problem much quicker!

Quote:
mail("test@yahoo.com","Testing Mail",$message,$email);

Thanks,
Nick


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.

Reply With Quote
  #6  
Old August 13th, 2002, 12:05 PM
nick316 nick316 is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2002
Location: N.S. Canada
Posts: 15 nick316 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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");

Reply With Quote
  #7  
Old August 13th, 2002, 07:55 PM
Ben Rowe
Guest
Dev Articles Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
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

Reply With Quote
  #8  
Old August 13th, 2002, 08:00 PM
nick316 nick316 is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2002
Location: N.S. Canada
Posts: 15 nick316 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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.

Reply With Quote
  #9  
Old August 13th, 2002, 08:14 PM
FrankieShakes FrankieShakes is offline
Frank The Tank!
Dev Articles Beginner (1000 - 1499 posts)
 
Join Date: Jun 2002
Location: Toronto, Canada
Posts: 1,246 FrankieShakes User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 8
Send a message via ICQ to FrankieShakes Send a message via MSN to FrankieShakes
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!

Reply With Quote
  #10  
Old August 13th, 2002, 09:18 PM
nick316 nick316 is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2002
Location: N.S. Canada
Posts: 15 nick316 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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

Reply With Quote
  #11  
Old August 13th, 2002, 09:54 PM
nick316 nick316 is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2002
Location: N.S. Canada
Posts: 15 nick316 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
got it now

Thanks everyone.

You were right Frankie about the sendmail_from.

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingGeneral Programming Help > mail problem


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway
Stay green...Green IT