Current location: Hot Scripts Forums » Programming Languages » PHP » Can't get mail() fuction to work


Can't get mail() fuction to work

Reply
  #1 (permalink)  
Old 05-18-05, 12:17 AM
amitroy5 amitroy5 is offline
Newbie Coder
 
Join Date: May 2005
Location: Mizoram, India
Posts: 56
Thanks: 0
Thanked 0 Times in 0 Posts
Can't get mail() fuction to work

I have apache 2 loaded on windows xp home with php 4.3.11 loaded. I have phpbb and it gets an error saying it cannot send the email. I really want this function to work. What should I do? Thanks!

I searched these forums and google. However, I have had no luck. Thanks for your time!
Reply With Quote
  #2 (permalink)  
Old 05-18-05, 04:53 AM
NeverMind's Avatar
NeverMind NeverMind is offline
Community VIP
 
Join Date: Aug 2003
Location: K.S.A
Posts: 2,257
Thanks: 0
Thanked 2 Times in 1 Post
you need to have sendmail module installed to use mail() ..
__________________
PHPSimplicity
We don't need a reason to help people - Zidane [FF9]
Reply With Quote
  #3 (permalink)  
Old 05-18-05, 10:06 AM
amitroy5 amitroy5 is offline
Newbie Coder
 
Join Date: May 2005
Location: Mizoram, India
Posts: 56
Thanks: 0
Thanked 0 Times in 0 Posts
Thank you. Does sendmail work for Windows? Also, how can I configure it for PHP. Thanks!
Reply With Quote
  #4 (permalink)  
Old 05-18-05, 10:47 AM
andrewvideo andrewvideo is offline
Newbie Coder
 
Join Date: May 2005
Posts: 40
Thanks: 0
Thanked 0 Times in 0 Posts
I thought that if you have PHP installed it should have mail() installed as well.

Check you mai() line

in the php it should look something like,

mail(emailTo, emailSubject,emailBody, emailHeader);

I try BB2 I could not to get to work. i only got a error. I think it do some thing with mySQL not settup right
Reply With Quote
  #5 (permalink)  
Old 05-18-05, 10:55 AM
amitroy5 amitroy5 is offline
Newbie Coder
 
Join Date: May 2005
Location: Mizoram, India
Posts: 56
Thanks: 0
Thanked 0 Times in 0 Posts
I know it has nothing to do with the coding because I uploaded it onto my host and it works. This is for phpBB's emailer.php script. I herd it uses sendmail. But how do you install that on a Windows XP SP2 based server? Thanks!
Reply With Quote
  #6 (permalink)  
Old 05-18-05, 10:41 PM
amitroy5 amitroy5 is offline
Newbie Coder
 
Join Date: May 2005
Location: Mizoram, India
Posts: 56
Thanks: 0
Thanked 0 Times in 0 Posts
I found out my IPS blocks port 25. However, I can use thier SMTP server. However, it requires a username and password. How can I do that via the php.ini file?
Reply With Quote
  #7 (permalink)  
Old 05-19-05, 10:47 AM
amitroy5 amitroy5 is offline
Newbie Coder
 
Join Date: May 2005
Location: Mizoram, India
Posts: 56
Thanks: 0
Thanked 0 Times in 0 Posts
Update: I got port 25 unblocked.
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
how do i work with PHP mail() function darkcarnival PHP 5 08-31-09 05:11 PM
mail() doesn't work mhs12grade1992 PHP 19 02-19-05 12:57 PM
mail() won't work with function() nassau PHP 5 02-16-05 07:16 PM
how mail client work?? akaash Perl 0 02-20-04 04:22 AM
mail() doesn't work anymore cassio PHP 2 01-05-04 09:20 AM


All times are GMT -5. The time now is 06:45 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.