PHP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingPHP Development

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:
Ajax Application Generator Generate database and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!
  #1  
Old August 5th, 2004, 03:14 PM
manofwax manofwax is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2004
Posts: 7 manofwax User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Smile Mail() HELP THANKS A LOT...

here is my mail.php:

<?
mail("fklam@ucdavis.edu", "testing", "nothing here", "From: admin@mydomain.com");
?>
============================
haha... basically, what i want it to do is to send an email to fklam@ucdavis.edu...

but it doesn't work... i'm wondering if i need the fourth parameter, cuz i saw somewhere, they don't have the forth parameter. But what i need to check in the VERY beginning?? i read"ed" somewhere saying i should go to the php.ini file, and point the [mail function] to somewhere? but what exactly i should point it to???

[mail function]
; For Win32 only. <---- i don't understand what it means, i have all my php scrip in unix machine, so do i need this??
SMTP = localhost <---- i saw that i need to change it to something, how do i find this "something"???

; For Win32 only.
sendmail-from = me@localhost.com

;For Unix only.....
;sendmail_path = <---- i don't have sendmail, what should i do???

-----------------
Do i just need to modify the sendmail-form? what should i chaneg it to??? and i also read"ed" somewhere saying i need some sort of email server, hahaha... how do i check if i have setup an email server??? It would be very nice of you, if you can tell me step by step of how to send an email? hahaha... // please assume that i know nothing...

Thanks a lot.

Reply With Quote
  #2  
Old August 6th, 2004, 02:45 AM
kode_monkey kode_monkey is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Posts: 367 kode_monkey User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 7 m 21 sec
Reputation Power: 6
You will need an smtp server for the mail function to work. Do a google search and I'm sure it'll turn up instructions on how to get one setup for whatever flavour/variety of unix you are using.

-KM-

Reply With Quote
  #3  
Old August 6th, 2004, 07:12 AM
dhouston's Avatar
dhouston dhouston is offline
Contributing User
Dev Articles Beginner (1000 - 1499 posts)
 
Join Date: May 2003
Location: Tennessee
Posts: 1,355 dhouston User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
Send a message via ICQ to dhouston
You're on a unix box and don't have sendmail installed? Most unix boxes have it installed by default. Type "which sendmail" at the command line and see what you turn up. If you get a path back, use that for the value in sendmail_path. If you don't have it, download and install it.
__________________
Please don't PM me asking for solutions outside the scope of a thread.
Keeping all responses in a thread stands to help others who come along later,
which is after all what this forum's all about.

Reply With Quote
  #4  
Old August 6th, 2004, 01:28 PM
manofwax manofwax is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2004
Posts: 7 manofwax User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
i just checked, "which sendmail", it didn't give me anything. hm... download it, and install? i will try, thanks a lot. One other question, so if i had the sendmail and setup the smtp server, i would be able to use mail()?? is that correct? millions thanks =)

Reply With Quote
  #5  
Old August 6th, 2004, 04:10 PM
dhouston's Avatar
dhouston dhouston is offline
Contributing User
Dev Articles Beginner (1000 - 1499 posts)
 
Join Date: May 2003
Location: Tennessee
Posts: 1,355 dhouston User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
Send a message via ICQ to dhouston
Yes, that should be correct. Failing that, there are SMTP classes out there that don't require sendmail (they just open sockets and send the messages). Check phpclasses.org (.net?) for one of those.

Reply With Quote
  #6  
Old August 7th, 2004, 06:48 PM
daidalus13 daidalus13 is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2004
Posts: 16 daidalus13 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 12 m 51 sec
Reputation Power: 0
Hmmm..
I am working on a project that needs to send mail. I configured my php.ini to point to an smtp server (actually, my ISP's smtp server) :

[mail function]
; For Win32 only.
SMTP = myISPs.smtl.server

(I am working on winXP)
and everything works fine. My question is more general. Are there any restrictions to which mail servers we can point? Can I use any server I like? What about the traffic that is caused to the smtp server?
Thanks
daidalus13

Reply With Quote
  #7  
Old August 8th, 2004, 03:05 AM
Itsacon's Avatar
Itsacon Itsacon is offline
Command Line Warrior
Click here for more information
 
Join Date: Aug 2004
Location: Sector ZZ9 Plural Z Alpha
Posts: 956 Itsacon User rank is Lance Corporal (50 - 100 Reputation Level)Itsacon User rank is Lance Corporal (50 - 100 Reputation Level)Itsacon User rank is Lance Corporal (50 - 100 Reputation Level)  Folding Points: 682581 Folding Title: Super Ultimate Folder - Level 2Folding Points: 682581 Folding Title: Super Ultimate Folder - Level 2Folding Points: 682581 Folding Title: Super Ultimate Folder - Level 2Folding Points: 682581 Folding Title: Super Ultimate Folder - Level 2Folding Points: 682581 Folding Title: Super Ultimate Folder - Level 2Folding Points: 682581 Folding Title: Super Ultimate Folder - Level 2Folding Points: 682581 Folding Title: Super Ultimate Folder - Level 2
Time spent in forums: 6 Days 8 h 23 m 34 sec
Reputation Power: 4
Send a message via ICQ to Itsacon
The only restriction is that you need to be able to use the SMTP server. Most ISP's block ip addresses that don't come from their own range, to prevent people from one ISP from using another ISP's server.
As long as you can use an SMTP server to send mail, so can PHP.

Only problem can be that some SMTP servers require a username/password (VERY rare), as far as I know, there's no workaround for that right now.

Reply With Quote
  #8  
Old August 17th, 2004, 03:58 PM
manofwax manofwax is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2004
Posts: 7 manofwax User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
i'm still not sure what i should change localhost to:

[mail function]
; For Win32 only.
SMTP = localhost

Any suggestion is appreciated. =)

Thanks

Reply With Quote
  #9  
Old August 18th, 2004, 12:43 AM
Itsacon's Avatar
Itsacon Itsacon is offline
Command Line Warrior
Click here for more information
 
Join Date: Aug 2004
Location: Sector ZZ9 Plural Z Alpha
Posts: 956 Itsacon User rank is Lance Corporal (50 - 100 Reputation Level)Itsacon User rank is Lance Corporal (50 - 100 Reputation Level)Itsacon User rank is Lance Corporal (50 - 100 Reputation Level)  Folding Points: 682581 Folding Title: Super Ultimate Folder - Level 2Folding Points: 682581 Folding Title: Super Ultimate Folder - Level 2Folding Points: 682581 Folding Title: Super Ultimate Folder - Level 2Folding Points: 682581 Folding Title: Super Ultimate Folder - Level 2Folding Points: 682581 Folding Title: Super Ultimate Folder - Level 2Folding Points: 682581 Folding Title: Super Ultimate Folder - Level 2Folding Points: 682581 Folding Title: Super Ultimate Folder - Level 2
Time spent in forums: 6 Days 8 h 23 m 34 sec
Reputation Power: 4
Send a message via ICQ to Itsacon
Look in your email program, in settings, for an entry 'outgoing mail'
there will be a server addres there. Copy that one.

Reply With Quote
  #10  
Old August 18th, 2004, 04:12 PM
manofwax manofwax is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2004
Posts: 7 manofwax User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
email program? =/ not sure what you meant

how do i get to the email program? haha...

Reply With Quote
  #11  
Old August 19th, 2004, 12:05 AM
Itsacon's Avatar
Itsacon Itsacon is offline
Command Line Warrior
Click here for more information
 
Join Date: Aug 2004
Location: Sector ZZ9 Plural Z Alpha
Posts: 956 Itsacon User rank is Lance Corporal (50 - 100 Reputation Level)Itsacon User rank is Lance Corporal (50 - 100 Reputation Level)Itsacon User rank is Lance Corporal (50 - 100 Reputation Level)  Folding Points: 682581 Folding Title: Super Ultimate Folder - Level 2Folding Points: 682581 Folding Title: Super Ultimate Folder - Level 2Folding Points: 682581 Folding Title: Super Ultimate Folder - Level 2Folding Points: 682581 Folding Title: Super Ultimate Folder - Level 2Folding Points: 682581 Folding Title: Super Ultimate Folder - Level 2Folding Points: 682581 Folding Title: Super Ultimate Folder - Level 2Folding Points: 682581 Folding Title: Super Ultimate Folder - Level 2
Time spent in forums: 6 Days 8 h 23 m 34 sec
Reputation Power: 4
Send a message via ICQ to Itsacon
I think we need more info:

-What OS is the server running?
-What server is the machine running?
-Is it your own machine?
-Do you have physical access to the machine?
-Do you use it for other things, or is it a dedicated server?
-Do you have root?

Reply With Quote
  #12  
Old August 19th, 2004, 12:29 PM
manofwax manofwax is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2004
Posts: 7 manofwax User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Talking

-What OS is the server running?
Linux-SUSE

-What server is the machine running?
what server?

-Is it your own machine?
No

-Do you have physical access to the machine?
No

-Do you use it for other things, or is it a dedicated server?
NO

-Do you have root?
Yes

I got the mail() working, but i still want to know how these question would help making mail() work

THANKS A LOT, Itsacon =)

Reply With Quote
  #13  
Old September 13th, 2004, 09:29 AM
andi_n80 andi_n80 is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Sep 2004
Posts: 1 andi_n80 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
problem

hello, actually this is not a reply but more of a question (problem).
apache (1.3.31, 2.0.50, with and without SSL) plus php 4.3.8. win xp sp2.
i'm within a university, and on win2k i was able to send mails with mail(), the basic function; now, i'm no longer able to send mails even if the settings in the php.ini are correct in my opinion. smtp=address of my mail server.
and it is really weird, because i have a nusphere phped editor which has a webserver incorporated and which is able to send mails with the same php.ini, but with a previous veresion of php (php 4.3.4).

can anyone give me an idea ?

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingPHP Development > Mail() HELP THANKS A LOT...


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 |