Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Mail command
Index -> Programming, PHP -> PHP Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Homer_simpson




PostPosted: 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)
Sponsor
Sponsor
Sponsor
sponsor
Amailer




PostPosted: Sat Sep 13, 2003 2:01 pm   Post subject: (No 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
Homer_simpson




PostPosted: Sat Sep 13, 2003 2:18 pm   Post subject: (No 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");
?>
Amailer




PostPosted: Sat Sep 13, 2003 2:34 pm   Post subject: (No 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
octopi




PostPosted: Sat Sep 13, 2003 3:33 pm   Post subject: (No 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)
Homer_simpson




PostPosted: Sat Sep 13, 2003 4:07 pm   Post subject: (No subject)

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




PostPosted: Sat Sep 13, 2003 4:10 pm   Post subject: (No 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.
Homer_simpson




PostPosted: Sat Sep 13, 2003 5:22 pm   Post subject: (No subject)

how do u do that exactly?!
Sponsor
Sponsor
Sponsor
sponsor
octopi




PostPosted: Sat Sep 13, 2003 5:34 pm   Post subject: (No subject)

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




PostPosted: Sat Sep 13, 2003 7:33 pm   Post subject: (No subject)

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




PostPosted: Sat Sep 13, 2003 7:35 pm   Post subject: (No subject)

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

Where else?
Homer_simpson




PostPosted: Sat Sep 13, 2003 8:03 pm   Post subject: (No subject)

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




PostPosted: Sat Sep 13, 2003 8:08 pm   Post subject: (No subject)

No.
Display posts from previous:   
   Index -> Programming, PHP -> PHP Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 13 Posts ]
Jump to:   


Style:  
Search: