I want to ask about email by the coding of php. Now, I using internal serval if i want send email out by internal serval can or not? Is it i want send email out must open one web? did any way can link out?
email problem in php
Collapse
X
-
I assume that by 'internal server' you mean you have a server installed at your PC, somthing like WAMP or alike.
In order to use the mail functions of PHP you must adapt the appropriate settings in your PHP.INI file. See PHP Mail functions on how to accomplish that.
Ronald -
You would (at least) have a server (like Apache), PHP (and maybe Perl), MySQL.Originally posted by SeeMei using apache and mysql. u mean is it this two?
I was talking about the configuration of PHP, because that is the function mail() that you want to use.
RonaldComment
-
my coding is like above but got error come out.Code:$to = "blue@example.com "; $subject = "hello my friend"; $message = "Hello How r u?"; $headers .= "To: blue<blue@example.com >\r\n"; $headers .= "From: Birthday Reminder <mymailadd@example.com>\r\n"; mail($to, $subject, $message, $headers);
the error is ====>
Warning: mail() [function.mail]: Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in C:\Apache2\htdo cs\mis\email.ph p on line "mail($to, $subject, $message, $headers);". so may i know how to set "ini_set()" ?Comment
-
Just do what I showed you in my previous post in this thread: read the mail functions chapter in the php manual and configure your mail configuration according to those instructions http://bytes.com/forum/post3157282-2.html
RonaldComment
-
Comment