View previous topic :: View next topic |
Author |
Message |
rado -
Joined: 14 Apr 2004 Posts: 67
|
Posted: Sun Aug 22, 2004 8:27 pm Post subject: php mail help? |
|
|
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 |
|
 |
rado -
Joined: 14 Apr 2004 Posts: 67
|
Posted: Sun Aug 22, 2004 10:09 pm Post subject: |
|
|
HELP! |
|
Back to top |
|
 |
rado -
Joined: 14 Apr 2004 Posts: 67
|
Posted: Mon Aug 23, 2004 10:33 am Post subject: |
|
|
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 |
|
 |
trinity -
Joined: 11 Nov 2003 Posts: 20 Location: Tampa, FL
|
Posted: Sat Aug 28, 2004 8:14 am Post subject: |
|
|
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 |
|
 |
|