How to make the code of PHP[mail()] work?
am 27.03.2010 03:07:06 von Lee David--0-1589485459-1269655626=:62510
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
=0A Dear Sir/Madam:
=0A
=0AGood day. I am the beginner for PHP With MySQL.
=0A
=0AI would like to learn PHP With MySQL as my hobby.
=0A
=0AI am trying the code of:
=0A
=0Amail($to, $subject, $msg, 'From:' . $email);
=0A
=0ABut the code of mail() is not functioning.
=0A
=0AIf anybody is kind enough, please provide some guidances for me to =0Aim=
plement a
=0Aproper setting.
=0A
=0AFor your info, i am using window XP home edition, Apache server 2.0, PHP=
=0A 5.0 & MYSQL 5.1 as my local testing server.
=0A
=0AAs per your advices, i have allow internet users to use the service of =
=0ASMTP in windows firewall.
=0A
=0AFrom the review server error log, i be able to observe Warning as below:=
=0A
=0A[Sat Mar 13 13:58:17 2010] [error] [client 127.0.0.1] PHP Warning: =0Am=
ail() []: Failed =0Ato connect t=
o mailserver at "localhost" port 25, verify your "SMTP" and =0A"smtp_port" =
setting in php.ini or use ini_set() in C:\\Program =0AFiles\\Apache Group\\=
Apache2\\test\\report.php on line 30, referer: =0Ahttp://localhost/report_T=
emp.html
=0A
=0AIf possible, could show me how configure the php.ini and any relevant =
=0Asetting:
=0A
=0AIn my php.ini, i be able to see:
=0A
=0A[mail function]
=0A; For Win32 only.
=0ASMTP =3D localhost
=0Asmtp_port =3D 25=0A 2 weeks ago =0A =
; For Win32 only.
=0A;sendmail_from =3D me@example.com
=0A
=0A; For Unix only. You may supply arguments as well (default: "sendmail =
=0A-t -i").
=0A;sendmail_path =3D
=0A
=0A; Force the addition of the specified parameters to be passed as extra =
=0Aparameters
=0A; to the sendmail binary. These parameters will always replace the value=
=0A of
=0A; the 5th parameter to mail(), even in safe mode.
=0A;mail.force_extra_parameters =
=20
Thanks.
=0A
=0AWarm Regards,
=0ADavid Lee
_______________________________________=0A è¾£è©å¦=
èéæ¹®âºè¬æè ª¥è=98=
ç=8A =0A http://cn.mail.yahoo.com
--0-1589485459-1269655626=:62510
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: quoted-printable
top" style=3D"font: inherit;"> gb(16, 16, 255); margin-left: 5px; padding-left: 5px;"> 21"> |
style=3D"font: inherit;" valign=3D"top">=0A content">Dear Sir/Madam: |
te>
_______________________________________
è¾=
£è©å¦èéæ¹®âºè ¬æ=87=
誥èç=8A
http://cn.mail.yahoo.com
--0-1589485459-1269655626=:62510--