Computer Science Canada

Mail command

Author:  Homer_simpson [ Sat Sep 13, 2003 1:57 pm ]
Post subject:  Mail command

code:
<?php
mail("nima1986@hotmail.com", "My Subject", "Blah Blah Blah");
?>

I Know in order to use that command i need to setup somestuffs on my computer i'm just not sure what :S
(i'm using Windows System)

Author:  Amailer [ Sat Sep 13, 2003 2:01 pm ]
Post subject: 

in php.ini
code:

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

; For Win32 only.
sendmail_from = me@localhost.com


i think that is it

Author:  Homer_simpson [ Sat Sep 13, 2003 2:18 pm ]
Post subject: 

i already have that fixed
code:
[mail function]
; For Win32 only.
SMTP = localhost

; For Win32 only.
sendmail_from = Admin@localhost.com

but i get this warning :
Warning: Failed to Connect in c:\apache\htdocs\mail.php on line 2
with this code:

code:
<?php
mail("nima1986@hotmail.com", "My Subject", "Blah blah blah");
?>

Author:  Amailer [ Sat Sep 13, 2003 2:34 pm ]
Post subject: 

oOo lol Very Happy
code:

@mail("me@me.com, "DAMM SUBJECT", "OM MESSAGE",  "From: \"$name\"<$email>\r\nX-Sender:$name using $email\r\nReturn-Path: Anonymous\r\nX-Mailer: Amailers $version\r\X-Message-Info: Anonymous\r\Received: Anonymous");


i used that for amailer, there is of course extra stuff Very Happy

Author:  octopi [ Sat Sep 13, 2003 3:33 pm ]
Post subject: 

You need to change the

code:
SMTP =
line to your smtp server of your isp.

Unless of course your running a smtp server on windows. (which you aren't)

Author:  Homer_simpson [ Sat Sep 13, 2003 4:07 pm ]
Post subject: 

do u know any good smtp servers that i could run on my comp?

Author:  octopi [ Sat Sep 13, 2003 4:10 pm ]
Post subject: 

Theres no point at all in running one.
So just use your isp's.

Even if you did set up your own, you would still have to tell it to pass stuff onto your ISP's anyway.

Author:  Homer_simpson [ Sat Sep 13, 2003 5:22 pm ]
Post subject: 

how do u do that exactly?!

Author:  octopi [ Sat Sep 13, 2003 5:34 pm ]
Post subject: 

to use your isp's mail server
just replace the word localhost with the address of your isp's smtp mailserver...

Author:  Homer_simpson [ Sat Sep 13, 2003 7:33 pm ]
Post subject: 

well how do i figure the address of the isp's stmp server?

Author:  octopi [ Sat Sep 13, 2003 7:35 pm ]
Post subject: 

Look in your isp's documention (website, books, cd's etc..)

Where else?

Author:  Homer_simpson [ Sat Sep 13, 2003 8:03 pm ]
Post subject: 

alright... thx
but for example can i use my hotmail account for this purpose?

Author:  octopi [ Sat Sep 13, 2003 8:08 pm ]
Post subject: 

No.


: