Jump to content

Recommended Posts

ACTUAlly i need to know

that is it possible to send email on windows

with php mail function

-------------------------------------

If yes then how i do not need parameters

help.

And tell me about the php.ini setting for

mail function

----------------------------------------

and tell me one thing more any mail server

required for this .

 

thanks

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

My php.ini setting are this

--------------------------

[mail function]

; For Win32 only.

 

SMTP = mail.technology-uprising.com

smtp_port = 25

 

; For Win32 only.

sendmail_from = ahtasham82@gmail.com

 

And error is

 

not able to connect to mail server

 

But still say that not able to connect to the mail server

please help me i want to send a simple email using php mail function

thanks

Link to comment
https://forums.phpfreaks.com/topic/87036-php-mail/#findComment-445983
Share on other sites

I REALLY DONT NO WHAT TYPE OF THIS MAIL SERVER my friend told me that bring this code

and paste it in your php.ini 

then you will able to send email .

BUT I HAVE TRIed

www.RUNBOX.com IT IS ALSO AN MAIL SERVER HOSTIng.

----------------------------------------------------------------------------

Please DO ME A FAVIOUR GO TO RUNBOx AND MAKE A SIMPLE FREE

ACCOUNT .

AND TeLl me It is possible to use that mail server to send email

thanks

---------------------------------------------------------------------------

Link to comment
https://forums.phpfreaks.com/topic/87036-php-mail/#findComment-446754
Share on other sites

I also had the problem when setting php.ini file but found that setting it in your code works.

 

<?php
//set the smtp server in the ini file
ini_set('SMTP','smtp.address.here');
//set where the mail is sent from in the ini file
ini_set('send_from','emailaddress@domain.com');

if (isset($_REQUEST['email']))
//if "email" is filled out, send email
  {
  //send email
  $email = $_REQUEST['email'] ; 
  $subject = $_REQUEST['subject'] ;
  $message = $_REQUEST['message'] ;
  mail( "youremail@domain.com", "Subject: $subject",
  $message, "From: $email" );
  echo "Thank you for using our mail form";
  }
else
//if "email" is not filled out, display the form
  {
  echo "<form method='post' action='Working.php'>
  Email: <input name='email' type='text'><br>
  Subject: <input name='subject' type='text'><br>
  Message:<br>
  <textarea name='message' rows='15' cols='40'>
  </textarea><br>
  <input type='submit'>
  </form>";
  }
?>

Link to comment
https://forums.phpfreaks.com/topic/87036-php-mail/#findComment-446821
Share on other sites

Yaaar rageave -------

he gave me this code like shown below

-----------------------------------------------

[mail function]

; For Win32 only.

SMTP = mail.his mail server name.com

smtp_port = 25 ;

 

; For Win32 only.

;sendmail_from = myfriend_email_Address

----------------------------------------------

 

 

but when i reuning this it said not able to connect to mail server

and onething more yaar please give me to tell me any mail server

address for use.

 

Link to comment
https://forums.phpfreaks.com/topic/87036-php-mail/#findComment-446824
Share on other sites

Ragive ---------------- now i am trying this code but they said

 

 

ERROR:

----------------------------------------------------

Warning: mail() [function.mail]: Failed to connect to mailserver at "smtp.runbox.com" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in C:\AppServ\www\mail.php on line 18

Thank you for using our mail form

---------------------------------------------------

 

my code is :

<?php

//set the smtp server in the ini file

ini_set('SMTP','smtp.runbox.com');

 

ini_set('SMTP_port','26');

 

//set where the mail is sent from in the ini file

ini_set('send_from','hamzanama@indiatimes.com');

 

if (isset($_REQUEST['email']))

//if "email" is filled out, send email

  {

  //send email

  $email = $_REQUEST['email'] ;

  $subject = $_REQUEST['subject'] ;

  $message = $_REQUEST['message'] ;

  mail( "hamzanama@indiatimes.com", "Subject: $subject",

  $message, "From: $email" );

  echo "Thank you for using our mail form";

  }

else

//if "email" is not filled out, display the form

  {

  echo "<form method='post' action=''>

  Email: <input name='email' type='text'><br>

  Subject: <input name='subject' type='text'><br>

  Message:<br>

  <textarea name='message' rows='15' cols='40'>

  </textarea><br>

  <input type='submit'>

  </form>";

  }

?>

 

 

 

 

Please try this code and tell me is it right or wrong

i am waiting for you

Link to comment
https://forums.phpfreaks.com/topic/87036-php-mail/#findComment-446827
Share on other sites

Try copying and pasting this, and just remember to define the forms action to the same name as the page

<?php
//set the smtp server in the ini file
ini_set('SMTP','smtp.runbox.com');

//set where the mail is sent from in the ini file
ini_set('send_from','hamzanama@indiatimes.com');

if (isset($_REQUEST['email']))
//if "email" is filled out, send email
  {
  //send email
  $email = $_REQUEST['email'] ; 
  $subject = $_REQUEST['subject'] ;
  $message = $_REQUEST['message'] ;
  mail( "hamzanama@indiatimes.com", "Subject: $subject",
  $message, "From: $email" );
  echo "Thank you for using our mail form";
  }
else
//if "email" is not filled out, display the form
  {
  echo "<form method='post' action=''>
  Email: <input name='email' type='text'>

  Subject: <input name='subject' type='text'>

  Message:

  <textarea name='message' rows='15' cols='40'>
  </textarea>

  <input type='submit'>
  </form>";
  }
?>

Link to comment
https://forums.phpfreaks.com/topic/87036-php-mail/#findComment-446829
Share on other sites

my page name is mail.php

----------------------------

error is :

 

Warning: mail() [function.mail]: Failed to connect to mailserver at "smtp.runbox.com" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in C:\AppServ\www\mail.php on line 16

Thank you for using our mail form

 

Please visit the the website to know about the runbox --

www.runbox.com  there is free signup

Please help me ..........................

Link to comment
https://forums.phpfreaks.com/topic/87036-php-mail/#findComment-446852
Share on other sites

After modification my code is look like

---------------------------------

<?php

//set the smtp server in the ini file

ini_set('SMTP','smtp.runbox.com');

 

//set where the mail is sent from in the ini file

ini_set('send_from','hamzanama@indiatimes.com');

 

if (isset($_REQUEST['email']))

//if "email" is filled out, send email

  {

  //send email

  $email = $_REQUEST['email'] ;

  $subject = $_REQUEST['subject'] ;

  $message = $_REQUEST['message'] ;

  mail( "hamzanama@indiatimes.com", "Subject: $subject",

  $message, "From: $email" );

  echo "Thank you for using our mail form";

  }

else

//if "email" is not filled out, display the form

  {

  echo "<form method='post' action='mail.php'>

  Email: <input name='email' type='text'>

 

  Subject: <input name='subject' type='text'>

 

  Message:

 

  <textarea name='message' rows='15' cols='40'>

  </textarea>

 

  <input type='submit'>

  </form>";

  }

?>

 

Link to comment
https://forums.phpfreaks.com/topic/87036-php-mail/#findComment-446854
Share on other sites

STILL NOT WORK AT ALL

 

--------------------------------------------

<?php

//set the smtp server in the ini file

ini_set('SMTP','smtp.runbox.com');

 

//set where the mail is sent from in the ini file

ini_set('send_from','hamzanama@indiatimes.com');

 

if (isset($_REQUEST['email']))

//if "email" is filled out, send email

  {

  //send email

  $email = $_REQUEST['email'] ;

  $subject = $_REQUEST['subject'] ;

  $message = $_REQUEST['message'] ;

  mail( "hamzanama@indiatimes.com", "Subject: $subject",$message, "From: $email" );

  echo "Thank you for using our mail form";

  }

else

//if "email" is not filled out, display the form

  {

  echo "<form method='post' action='mail.php'>

  Email: <input name='email' type='text'>

 

  Subject: <input name='subject' type='text'>

 

  Message:

 

  <textarea name='message' rows='15' cols='40'>

  </textarea>

 

  <input type='submit'>

  </form>";

  };

?>

Link to comment
https://forums.phpfreaks.com/topic/87036-php-mail/#findComment-447060
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.