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 December 19th, 2003, 07:56 PM
george george is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 11 george User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
mail() function doesnt give any error

i have a problem in sending mail
i installed easy SMTP server
and i have apache server 1.3.27
from devshed
when i run this code no error
appears and the mail was not sent
it appears a white page
when i comment the two ini_set()
functions as appeared
else it says failt o send the email
,any help???

<?php
//ini_set("SMTP","localhost");
//ini_set("sendmail_from","funnygogo@hotmail.com");

$e_mail="funnygogo@hotmail.com";
$bodym="rn From him";
$namem="george";
$from1="From: ".$name."rn";

$gg=@mail("$e_mail","$namem","$bodym","$from1");
if($gg) print"the mail was sent ";
else print"fail to send the mail";

?>

Reply With Quote
  #2  
Old December 20th, 2003, 03:35 PM
CodeKadiya CodeKadiya is offline
Contributing User
Codewalkers Regular (2000 - 2499 posts)
 
Join Date: Apr 2007
Location: Colombo,Sri Lanka
Posts: 2,330 CodeKadiya User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 8 h 50 m 36 sec
Reputation Power: 5
Send a message via Yahoo to CodeKadiya
RE: mail() function doesnt give any error

Try removing '@' sign near the mail() function.

Reply With Quote
  #3  
Old December 20th, 2003, 09:20 PM
george george is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 11 george User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
RE: mail() function doesnt give any error


when i remove @ near mail() function
i recieved that error

Warning: Failed to Receive in d:phpdevwwwsendmail.php on line 10
fail to send the mail

and that is the code again
<?php
ini_set("SMTP","localhost");
//ini_set("sendmail_from","funnygogo@localhost.com");

$e_mail="funnygogo@hotmail.com";
$bodym="rn From him";
$namem="george";
$from1="From: ".$name."rn";

$gg=mail("$e_mail","$namem","$bodym","$from1");
if($gg) print"the mail was sent ";
else print"fail to send the mail";

?>
thanks for help

Reply With Quote
  #4  
Old December 21st, 2003, 12:07 AM
CodeKadiya CodeKadiya is offline
Contributing User
Codewalkers Regular (2000 - 2499 posts)
 
Join Date: Apr 2007
Location: Colombo,Sri Lanka
Posts: 2,330 CodeKadiya User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 8 h 50 m 36 sec
Reputation Power: 5
Send a message via Yahoo to CodeKadiya
RE: mail() function doesnt give any error

Hey, just a tip. Can you try sending your mail not to a Yahoo or Hotmail... just to another mails address. Because I have seen some guyz here had problems in sending mail from script to Yahoo and Hotmail addresses.

Reply With Quote
  #5  
Old December 21st, 2003, 06:56 PM
george george is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 11 george User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
RE: mail() function doesnt give any error

i changed the email
and it works BUT
is there any way that i could send emails@yahoo.com
or emails@hotmail.com
becuse they are very important
and also thanks for giving me hope that it will work

Reply With Quote
  #6  
Old December 21st, 2003, 11:41 PM
george george is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 11 george User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
RE: mail() function doesnt give any error


thank you very much ,,,,,,,,,,,
it works!!!!!!!!!!!!!!!!!1

Reply With Quote
  #7  
Old December 22nd, 2003, 12:12 AM
CodeKadiya CodeKadiya is offline
Contributing User
Codewalkers Regular (2000 - 2499 posts)
 
Join Date: Apr 2007
Location: Colombo,Sri Lanka
Posts: 2,330 CodeKadiya User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 8 h 50 m 36 sec
Reputation Power: 5
Send a message via Yahoo to CodeKadiya
RE: mail() function doesnt give any error

Is it working for yahoo and hotmail now? Resolve the thread.

Reply With Quote
  #8  
Old January 15th, 2004, 08:59 AM
Anonymous Anonymous is offline
Registered User
Codewalkers God 35th Plane (22000 - 22499 posts)
 
Join Date: Apr 2007
Posts: 22,309 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 25
RE: mail() function doesnt give any error

Sir it will be very helpful for other people if you post how you solve the problem.

Reply With Quote
  #9  
Old January 15th, 2004, 02:01 PM
fdocruzs fdocruzs is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Ontario, Canada
Posts: 18 fdocruzs User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via Yahoo to fdocruzs
RE: RE: mail() function doesnt give any error

Hey guyz, I'm still have the problem, I tried the above code and I don't get any error (it say that e-mail was sent) but if I use yahoo.com or hotmail.com I dont get any mail, howerver if I use my company e-mail (company.org) it work's. Something is missing in the solution.


Quote:
Sir it will be very helpful for other people if you post how you solve the problem.


Reply With Quote
  #10  
Old January 15th, 2004, 02:17 PM
CodeKadiya CodeKadiya is offline
Contributing User
Codewalkers Regular (2000 - 2499 posts)
 
Join Date: Apr 2007
Location: Colombo,Sri Lanka
Posts: 2,330 CodeKadiya User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 8 h 50 m 36 sec
Reputation Power: 5
Send a message via Yahoo to CodeKadiya
RE: mail() function doesnt give any error

Try this code for mailing to hotmail and yahoo. Worked for me!
php Code:
Original - php Code
  1. <?
  2.  
  3. $to = "Coolguy <coolguy@hotmail.com>";
  4. $subject = "You've got mail!";
  5. $message = "Your message here";
  6. $headers = "From: me@mail.comn"; $headers .= "MIME-Version: 1.0n";
  7. $headers .= "Content-type: text/html; charset=iso-8859-1n";
  8. $headers .= "Reply-To: me <me@mail.com>n";
  9. $headers .= "X-Priority: 1n";
  10. $headers .= "X-MSMail-Priority: Highn";
  11. $headers .= "X-Mailer: My mailer";
  12.  
  13. mail ($to, $subject, $message, $headers);
  14. ?>

Reply With Quote
  #11  
Old January 15th, 2004, 02:28 PM
fdocruzs fdocruzs is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Ontario, Canada
Posts: 18 fdocruzs User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via Yahoo to fdocruzs
RE: mail() function doesnt give any error

I tried, but it doesn't work. I don't get any error, then the script it's ok but I don't get the message on hotmail. I think that my problem should be somewhere in the SMTP because if I use myemail.org it works, why not for hotmail.com ?


Reply With Quote
  #12  
Old January 15th, 2004, 02:41 PM
CodeKadiya CodeKadiya is offline
Contributing User
Codewalkers Regular (2000 - 2499 posts)
 
Join Date: Apr 2007
Location: Colombo,Sri Lanka
Posts: 2,330 CodeKadiya User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 8 h 50 m 36 sec
Reputation Power: 5
Send a message via Yahoo to CodeKadiya
RE: mail() function doesnt give any error

Try Yahoo! instead of Hotmail. Strange thing is when I just use mail() function it didn't go to Hotmail/Yahoo. But after adding those headers it goes. Should work for you too!

Reply With Quote
  #13  
Old January 17th, 2004, 06:43 PM
fdocruzs fdocruzs is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Ontario, Canada
Posts: 18 fdocruzs User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via Yahoo to fdocruzs
RE: mail() function doesnt give any error

I give up, yahoo, hotmail and latinmail, etc, don't work and even another corporate e-mail outside my server doesn't work, now I'm sure that I have a SMTP problem but I don't know what it is. Any idea ?

Reply With Quote
  #14  
Old January 17th, 2004, 10:43 PM
george george is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 11 george User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
RE: mail() function doesnt give any error

this what i did i have a hotmail account
try what i wrote and i wish you good luck
PART1
configuring outlookexpress
1-open outlookexpress that is installed with windows
2-chooose tools>Accounts>Add>Mail
3-write your name thgat will be displayed in the message that will be sent
4-click Next and choose i already have an email address
5- write your email address down and click next
6-choose your incoming email service provider hotmail
8-the incoming IMAP or POP3 server is
http://services.msn.com/svcs.hotmail/httpmail.asp
9-click next
10-type your account name and the password that you use to enter the hotmail and click next

PARTR2
download the "easy SMTP server" to make your Pc SMTP server
edit the file php.ini
if you are using phpdev (wonderful)
go to phpphpsapiinstall and change
SMTP=yourname
max_execution_time=60 #the defualt is 30
(becuse it sometimes takes much time)

______________________________________
THEN GO TO EASY SMTP SERVER>CONFIGURE>CHECK THE CHECKBOX
(this check box results from configuring outlook express
also edit the php>ini-dist and make it php.ini
and also change
SMTP+LOCALHOST
MAX_EXECUTION_TIME=60

Reply With Quote
  #15  
Old June 10th, 2006, 04:00 AM
Anonymous Anonymous is offline
Registered User
Codewalkers God 35th Plane (22000 - 22499 posts)
 
Join Date: Apr 2007
Posts: 22,309 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 25
RE: mail() function doesnt give any error

All emails sent using this script usually go to the Junk Email folder in hotmail. Look into the junk folder of your hotmail account. it should be there. Now, how to make the script not to send the message to junk folder is still unknown. I hope somebody can come up with a solution.

Reply With Quote
Reply

Viewing: Codewalkers ForumsPHP RelatedPHP Installation > mail() function doesnt give any error


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 7 Hosted by Hostway
For more Enterprise Application Development news, visit eWeek