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
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
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 = me@example.com

; 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
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
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 = me@example.com

; 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
Share on other sites

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

 

and diz s ma code

<?php

 

$to = "ashii@gmail.com";

$subject = "Test mail";

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

$from = "someone@yahoo.com";

$headers = "From: $from";

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

echo "Mail Sent.";

 

?>

 

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.