How to Send mail() using EasyPHP

[b]Hi,
I am new to php. I heard about the mail function in php.
I thoght that i could send mail with out logining in to my account.
i thoght it was great.but when i tried to send mail. that is i woke from the dream.
My friend said me to use Easyphp. So i ahve downloaded it and insatlled it.

CODE:
<?php
echo “<html><body>”;
mail (“p.tamilselvan@gmail.com”, “Subject”, “Hello!”);
echo “Sending mail…”;
echo “</body></html>”;
?>

ERROR:

Warning: 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 d:\easyphp\www\mail_test.php on line 3

Want to know ur IP ANd other details.

CONFIGURING php.ini (Setting the SMTP)!!!
I want to send a mail via php mail function.
When ever i send a mail from the php mail().
The following error comes.And i could not send any mail.
Please help me in configuring the php.ini.
And what values should be set in

smtp=?
smtp_port=?
sendmail_from=?

My Actual php.ini is
[mail function]
; For Win32 only.
SMTP = localhost
smtp_port = 25
; For Win32 only.
sendmail_from = me@localhost.com

A few guys gave advice to save the SMTP to my ISP provider i did so.

Then when i sent mail.
The following error came.

Warning: mail(): SMTP server response: 550 5.7.1 Relaying not allowed: p.tamilselvan@gmail.com in d:\easyphp\www\mail_test.php on line 3

Please Reply the changes
Thanks in advance.
TaM [/b]

In php.ini change:
SMTP = localhost
to:
SMTP = your.isp.smtp.com

i.e use your ISP’s smtp server, the same server you entered when setting up an outlook/outlook express account for example. Your ISP’s homepage should tel you what the smtp server(s) are if you don’t know.

Set sendmail_from to whatever email address you want on outgoing emails, for example:
sendmail_from = p.tamilselvan@gmail.com

hello dude,
i have configured the smtp sever in outlook express and send/ receive mail from it.

but when i use the same smtp server in the php.ini

the mail is not going and reporting the following error

My Actual php.ini is
[mail function]
; For Win32 only.
SMTP = smra.sancharnet.in
smtp_port = 25
; For Win32 only.
sendmail_from = me@localhost.com

A few guys gave advice to save the SMTP to my ISP provider i did so.

Then when i sent mail.
The following error came.

Warning: mail(): SMTP server response: 550 5.7.1 Relaying not allowed: p.tamilselvan@gmail.com in d:\easyphp\www\mail_test.php on line 3

Please Reply the changes
Thanks in advance.
TaM

Make sure sendmail_from is set to the email address your ISP gave you, e.g yourname@sancharnet.in or whatever it is :wink:

gmail use authentification and SSL, I doubt you can use that with PHP
Don’t your ISP provide a mail/SMTP server?