PHP Installation
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
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:
  #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 8 m 12 sec
Reputation Power: 5
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: 4
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: 4
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: 3
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: 3
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




 Free IT White Papers!
 
Create the Optimal Architecture for your Critical Applications
Warburton's the largest independently owned bakery in the UK faced a number of difficult challenges in providing the most robust yet efficient IT infrastructure for their organization's success. IBM's services combined with their xSeries servers created the perfect platform for their SAP environment with sufficient flexibility, and did so in very time effective fashion.

Request Your Free Technology Downloads!
 
Five Best Practices for Deploying a Successful Service-Oriented Architecture
This white paper describes the benefits you can expect with SOA, and how IBM can help take your business there.

Request Your Free Technology Downloads!
 
Gartner Magic Quadrant for Application Delivery Controllers
Gartner summarizes its view on Application Delivery Controllers, evaluates strengths and weaknesses of solutions, and provides Magic Quadrant reporting for a quick comparison across all vendors. Learn from Gartner how you can benefit from an all-in-one device like Citrix NetScaler that delivers the highest levels of availability, performance and security.

Request Your Free Technology Downloads!
 
Knowledge is Power
What you don't know can hurt you, and is likely costing you money and increasing your security risks during an era of scarce resources. This white paper proposes six key strategies that enterprise security managers can use to improve their network defense posture.

Request Your Free Technology Downloads!
 
Rationalizing the Multi-Tool Environment
The rationalized multi-tool approach is flexible, scalable and cost effective. It provides the necessary input to the IT service management business processes. It preserves prior investments in monitoring tools, empowers technologists to select the best tools with which to do their jobs, and enhances effective response to incidents.

Request Your Free Technology Downloads!
 

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




© 2003-2010 by Developer Shed. All rights reserved. DS Cluster 2 Hosted by Hostway
For more Enterprise Application Development news, visit eWeek