PHP Installation
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Click Here
Go Back   Codewalkers ForumsPHP RelatedPHP Installation

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
You eat, breathe and sleep innovation. Build your mobile intelligence with BlackBerry® experts this July. Register Today!
  #1  
Old February 1st, 2004, 07:16 PM
trunte trunte is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 4 trunte User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
sendmail_form and php.ini

Can anyone help me please.

I am a complete beginner in PHP, and I am trying to send a simple e-mail. I use windows, and php 4.3.4. I have changed the php.ini file so the sendmail_from = my e-mail address. And yes, I did also change the smtp server to my IP address. Anyway, I saved the php.ini file, restarted Apache and checked out the phpinfo(); function to see if it had worked. The smtp has changed on this page, but not the sendmail_from. Is that not a little weird? Or am I being stupid? The error I get is: Warning: mail(): "sendmail_from" not set in php.ini or custom "From:" header missing in c:program filesapache groupapachehtdocssend_simpleform.php on line 13

The code is
php Code:
Original - php Code
  1. <?
  2. $msg = "E-MAIL SENT FROM WWW SITE n";
  3. $msg .= "Sender's Name: t$_POST[sender_name] n";
  4. $msg .= "Sender's E-mail: t$_POST[sender_email] n";
  5. $msg .= "Message: t$_POST[message] n n";
  6.  
  7. $to = "trunte80@msn.com";
  8. $subject = "Web Site Feedback";
  9.  
  10. $mailheaders = "From: Trunte80@msn.com <> n";
  11. $mailheaders .= "Reply-To: $_POST[sender_email] n n";
  12.  
  13. mail($to, $subject, $msg, $mailheaders);
  14. ?>
  15.  
  16. <HTML>
  17. <HEAD>
  18. <TITLE><Simple Feedback Form Sent</TITLE>
  19. </HEAD>
  20. <BODY>
  21.  
  22. <H1>The following e-mail has been sent:</H1>
  23.  
  24. <P><strong>Your Name:</strong><br>
  25. <? echo "$_POST[sender_name]"; ?>
  26.  
  27. <P><strong>Your E-mail Address:</strong><br>
  28. <? echo "$_POST[sender_email]"; ?>
  29.  
  30. <P><strong>Message:</strong><br>
  31. <? echo "$_POST[message]"; ?>
  32.  
  33. </BODY> 


Can anybody help me please?
Thank you

Reply With Quote
  #2  
Old February 2nd, 2004, 12:53 AM
nawlej nawlej is offline
Contributing User
Codewalkers Regular (2000 - 2499 posts)
 
Join Date: Apr 2007
Location: Dallas, Tx. USA
Posts: 2,008 nawlej User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 11 h 7 m 51 sec
Reputation Power: 4
RE: sendmail_form and php.ini

Well, can you post that line from yoru config file?

Reply With Quote
  #3  
Old February 2nd, 2004, 01:29 AM
postalcow postalcow is offline
Codewalkers Beginner (1000 - 1499 posts)
 
Join Date: Apr 2007
Location: Ford CIty, PA USA
Posts: 1,267 postalcow User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 3
Send a message via Yahoo to postalcow
RE: sendmail_form and php.ini

First instead of using your IP simply use localhost in the php.ini

Then try this instead
php Code:
Original - php Code
  1.  
  2. $mailheaders = "From:Trunte80@msn.com <Trunte80@msn.com> rn";
  3. $mailheaders .= "Reply-To:$_POST[sender_email]rn";

Reply With Quote
  #4  
Old February 4th, 2004, 05:52 PM
trunte trunte is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 4 trunte User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
RE: sendmail_form and php.ini

Thanx, that did the trick, but I am still not receiving any e-mail on my address? Is that because I am now using localhost?

Reply With Quote
  #5  
Old February 4th, 2004, 06:16 PM
postalcow postalcow is offline
Codewalkers Beginner (1000 - 1499 posts)
 
Join Date: Apr 2007
Location: Ford CIty, PA USA
Posts: 1,267 postalcow User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 3
Send a message via Yahoo to postalcow
RE: sendmail_form and php.ini

Localhost just means that you are using the local mail process to send the mail.

Any Errors?

Do you have access to the mail logs? Look for errors.

Reply With Quote
  #6  
Old February 4th, 2004, 06:41 PM
trunte trunte is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 4 trunte User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
RE: sendmail_form and php.ini

No errors,
I don't think I have access to the mail-log files, but I might be wrong..

Reply With Quote
  #7  
Old February 5th, 2004, 12:00 AM
brewthatistrue brewthatistrue is offline
Contributing User
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: CA, USA
Posts: 277 brewthatistrue User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 38 sec
Reputation Power: 2
RE: sendmail_form and php.ini

you use msn
i assume they have the same "problem" that hotmail has

basically, you need to have some more headers, and need to make sure you use a CRLF (carriage return, and newline ... rn)
see this

Reply With Quote
  #8  
Old February 6th, 2004, 07:25 PM
trunte trunte is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 4 trunte User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
RE: sendmail_form and php.ini

I have changed to localhost, and changed my e-mail address to a non-msn/hotmail address, but I am still not receiving any e-mails? Weird hu?

Reply With Quote
  #9  
Old February 6th, 2004, 08:28 PM
brewthatistrue brewthatistrue is offline
Contributing User
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: CA, USA
Posts: 277 brewthatistrue User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 38 sec
Reputation Power: 2
RE: sendmail_form and php.ini

did you do the rn, etc. i linked to?

Reply With Quote
Reply

Viewing: Codewalkers ForumsPHP RelatedPHP Installation > sendmail_form and php.ini


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 3 hosted by Hostway