Jump to content

Problem In PHP MAIL


ashii

Recommended Posts

a Big Hi ;)to all the PHP Freaks members ........

I gona Start ma Career in PHP Freaks by Posting Ma Doubt.....

 

i amjust trying on to send a mail using PHP. wher i followed W3schools Tutorials

http://www.w3schools.com/php/php_mail.asp

but i am failin to send it  ....

i think that i need to do sum configurations in ma PHP.ini file or somewhere....

can u please help me in this case  ??? ??? ??? ::) ::)::) :'( :'(

 

regards..

Link to comment
https://forums.phpfreaks.com/topic/151698-problem-in-php-mail/
Share on other sites

well can you give us some more detail like what system are you using Linux or windows?

and the php.ini values for SMTP, smtp_port and sendmail_path please

if you dont have access to your php.ini create a simple script like

<?php
phpinfo();
?>

it will show all the details regarding your PHP configuration.

 

Scott.

Link to comment
https://forums.phpfreaks.com/topic/151698-problem-in-php-mail/#findComment-796633
Share on other sites

well can you give us some more detail like what system are you using Linux or windows?

and the php.ini values for SMTP, smtp_port and sendmail_path please

if you dont have access to your php.ini create a simple script like

 

Yeah!! Rat Am Workin in Windows...

dis is the settings in PHP.INI file

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

; For Win32 only.
;sendmail_from = [email protected]

; For Unix only.  You may supply arguments as well (default: "sendmail -t -i").
;sendmail_path = "C:\xampplite\sendmail\sendmail.exe -t"

; Force the addition of the specified parameters to be passed as extra parameters
; to the sendmail binary. These parameters will always replace the value of
; the 5th parameter to mail(), even in safe mode.
;mail.force_extra_parameters =

the entire mail function is above...

 

what is the changes that i have to do???

??? ???

Thank u in Advance

 

Link to comment
https://forums.phpfreaks.com/topic/151698-problem-in-php-mail/#findComment-796634
Share on other sites

i see you are running a mail transport program?

the current setup requires a mail server listening on port 25.

i would advise you to get the full version of xampp as it has a mail transport system that can be used.

 

i hope that i use the fullversion of XAMMP...

or can u gimme the link to download the full version

 

this is the error that i get when i send the mail

 

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:\xampplite\htdocs\mail.php on line 8

 

Link to comment
https://forums.phpfreaks.com/topic/151698-problem-in-php-mail/#findComment-796645
Share on other sites

does your ISP provide mail services to you?

if so your best bet at the moment is to set that section of you php.ini to

; For Win32 only.
;SMTP = localhost
;smtp_port = 25

; For Win32 only.
;sendmail_from = [email protected]

; For Unix only.  You may supply arguments as well (default: "sendmail -t -i").
sendmail_path = "C:\xampplite\sendmail\sendmail.exe -t"

; Force the addition of the specified parameters to be passed as extra parameters
; to the sendmail binary. These parameters will always replace the value of
; the 5th parameter to mail(), even in safe mode.
;mail.force_extra_parameters =

go to

C:\xampplite\sendmail\ and edit sendmail.ini so that it looks something like

[sendmail]
smtp_server=smtp.your.isp.com

smtp_port=25

that way your mail will go to your ISP and then hopefully to you

 

Scott.

 

 

 

Link to comment
https://forums.phpfreaks.com/topic/151698-problem-in-php-mail/#findComment-796649
Share on other sites

Cant V Use our Localhost as our SMTP server ????

 

and diz s ma code

<?php

 

$to = "[email protected]";

$subject = "Test mail";

$message = "Hello! This is a simple email message.";

$from = "[email protected]";

$headers = "From: $from";

mail($to,$subject,$message,$headers);

echo "Mail Sent.";

 

?>

 

 

Link to comment
https://forums.phpfreaks.com/topic/151698-problem-in-php-mail/#findComment-796671
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.