php mail help?

 
Post new topic   Reply to topic    Aprelium Forum Index -> PHP
View previous topic :: View next topic  
Author Message
rado
-


Joined: 14 Apr 2004
Posts: 67

PostPosted: Sun Aug 22, 2004 8:27 pm    Post subject: php mail help? Reply with quote

How to send email? Or what is the problem?
The script is from: http://www.freewebmasterhelp.com/tutorials/php/5

<?php
$to = "testmail@mnet.bg";
$subject = "PHP Is Great";
$body = "PHP is one of the best scripting languages around";
$headers = "From: testmail1@mnet.bg\n";
mail($to,$subject,$body,$headers);
echo "Mail sent to $to";
?>

The result is:

Warning: mail(): "sendmail_from" not set in php.ini or custom "From:" header missing in C:\All\LIB\sites\stats\email.php on line 6
Mail sent to testmail@mnet.bg

Here is php.ini (c:\windows\php.ini):

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

; For Win32 only.
sendmail_from = testmail1@mnet.bg

; For Unix only. You may supply arguments as well (default: "sendmail -t -i").
;sendmail_path =
...


Really have no idea - How to send email? HELP?


Last edited by rado on Mon Aug 23, 2004 7:55 am; edited 1 time in total
Back to top View user's profile Send private message
rado
-


Joined: 14 Apr 2004
Posts: 67

PostPosted: Sun Aug 22, 2004 10:09 pm    Post subject: Reply with quote

HELP!
Back to top View user's profile Send private message
rado
-


Joined: 14 Apr 2004
Posts: 67

PostPosted: Mon Aug 23, 2004 10:33 am    Post subject: Reply with quote

I found the problem:

; php.ini
...
[mail function]
; For Win32 only.
SMTP = 83.163.110.34 - the IP or DNS have to be active email server!

; For Win32 only.
sendmail_from = NULL

; For Unix only. You may supply arguments as well (default: "sendmail -t -i").
;sendmail_path =
...

Works this way! (but a little bit primitive)
(if not, the result is: Warning: mail(): SMTP server response: 553 sorry, that domain isn't in my list of allowed rcpthosts (#5.7.1) in )
Back to top View user's profile Send private message
trinity
-


Joined: 11 Nov 2003
Posts: 20
Location: Tampa, FL

PostPosted: Sat Aug 28, 2004 8:14 am    Post subject: Reply with quote

If you are going to use the mail function of PHP, I would suggest you look into running your own mail server (or at least an SMTP server).

Then you can specify:

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


ArGoSoft offers 3 different versions of their mail server... one of them being freeware.

http://argosoft.com/
_________________
Please feel free to visit my websites:
BNBT EasyTracker | The Trinity Forums | The Piscean Realm of ZionMatrix
Back to top View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    Aprelium Forum Index -> PHP All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB phpBB Group