PHP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 



Go Back   Dev Articles Community ForumsProgrammingPHP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old May 5th, 2003, 07:55 PM
EXDev EXDev is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Mar 2003
Posts: 2 EXDev User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
how to configure php.ini to send email via smtp which require password

hi all

my problem is how to configure php.ini to connect to my smtp server which require password authentication.
i can send mail via smtp which does not check password, but when i try to use php to send mail via smtp with password authentication, it faided. can i specific my smtp user info in the php.ini?

thanks

Reply With Quote
  #2  
Old May 6th, 2003, 10:26 AM
jpenn jpenn is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Oct 2002
Location: Washington, DC
Posts: 317 jpenn User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 m 3 sec
Reputation Power: 16
Quote:
how to configure php.ini to send email via smtp which require password

You would actually make your own mail method in your script and use fsockopen() or popen() to connect to your smtp and send the password that way...
__________________
~ Joe Penn

We work for free to help make this a valuable resource on the internet. Do you appreciate the help - did we provide help that will help you prosper and help that has contributed to sharpening your current skill set?

Show your appreciation and purchase something from our Amazon Wishlist's - it's simple and a great way to say thank you.




Reply With Quote
  #3  
Old October 15th, 2006, 11:15 AM
venradio venradio is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Oct 2006
Posts: 1 venradio User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 18 m 57 sec
Reputation Power: 0
Quote:
Originally Posted by jpenn
You would actually make your own mail method in your script and use fsockopen() or popen() to connect to your smtp and send the password that way...


Can you give me a example .
Or can u edit this so i can us smtp authentication
PHP Code:
<?
error_reporting
(E_ALL);
require(
"config.php");

if(empty(
$lang_file))
{
    
$lang_file "lang_english.lng";
}

include(
"languages/" $lang_file);
include(
"header.txt");
?>

<link rel="stylesheet" content="text/css" href="style.css">
<center><img src="images/logo.jpg"></center>


<table cellpadding="2" cellspacing="0" width="75%" align="center">
  <tr>
    <td colspan="2"><br><hr style="border-style: dashed; size="1"><br></td>
  </tr>
</table>

<table border="1" cellpadding="2" cellspacing="0" width="50%" class="content" align="center">
  <tr class="title">
    <td width="100%" align="center"><? echo $text['1'?></td>
  </tr>
  <tr>
    <td width="100%"><? echo $text['9'?> ...</td>
  </tr>
</table>

<?
}
else
{
?>

<title>
<?
    
echo htmlspecialchars($topsite_name) ."&nbsp;&nbsp;( " .  $text['107'] ." : "mysql_result(mysql_query("SELECT COUNT(1) FROM "$table ."_sites"),0) . " )";
?>
</title>
<center>
  <table cellpadding="0" cellspacing="0" width="75%">
    <tr>
      <td width="100%"><hr style="border-style: dashed">
      <center><a href="index.php"><? echo $text['2'?></a>&nbsp;-&nbsp;
      <a href="join.php"><? echo $text['3'?></a>&nbsp;-&nbsp;
      <a href="edit.php"><? echo $text['4'?></a>&nbsp;-&nbsp;
      <a href="lostid.php"><? echo $text['5'?></a>&nbsp;-&nbsp;
      <a href="lostcode.php"><? echo $text['6'?></a>&nbsp;-&nbsp;
      <a href="passreset.php"><font class="active"><? echo $text['7'?></font></a></center></td>
    </tr>
  </table>
</center>

<?
    
if(!isset($_POST['submit']) AND !isset($_GET['reset']))
    {
?>

    <center><br>
    <table border="1" cellpadding="2" cellspacing="0" width="50%" class="content">
      <tr class="title">
        <form method="POST">
        <input type="hidden" value="1" name="submit">
        <td width="100%" colspan="2"><p align="center"><? echo $text['99'?></td>
      </tr>
      <tr>
        <td width="50%"><? echo $text['96'?> :</td>
        <td width="50%"><input type="text" name="email" size="30"></td>
      </tr>
      <tr>
        <td width="50%"><? echo $text['97'?> :</td>
        <td width="50%"><input type="password" name="new1" size="12" maxlength="12"></td>
      </tr>
      <tr>
        <td width="50%"><? echo $text['97'?> [ <? echo $text['59'?> ]:</td>
        <td width="50%"><input type="password" name="new2" size="12" maxlength="12"></td>
      </tr>
      <tr>
        <td width="100%" colspan="2"><p align="center"><input type="submit" value="<? echo $text['98'?>"></td>
      </tr>
    </table>
    </center>

<?
    
}
    if(isset(
$_POST['submit']) AND !isset($_GET['reset']))
    {
        
$query mysql_query("SELECT COUNT(1) FROM " $table "_sites WHERE email = '" $_POST['email'] . "'");
        
$result mysql_result($query,0);

        if(!
$result)
        {
?>

<center><br>
  <table border="1" cellpadding="2" cellspacing="0" width="50%" class="content">
    <tr class="title">
      <td width="100%"><p align="center"><? echo $text['99'?></td>
    </tr>
    <tr>
      <td width="100%"><? echo $text['100'?> ...
      <br><br><a href="javascript:history.go(-1)"><< <? echo $text['20'?></a></td>
    </tr>
  </table>
</center>

<?
        
}
        else
        {
            if(
$_POST['new1'] != $_POST['new2'] OR !isset($_POST['new1']) OR !isset($_POST['new2'])){
?>

<center><br>
  <table border="1" cellpadding="2" cellspacing="0" width="50%" class="content">
    <tr class="title">
      <td width="100%"><p align="center"><? echo $text['99'?></td>
    </tr>
    <tr>
      <td width="100%"><? echo $text['61'?> ...
      <br><br><a href="javascript:history.go(-1)"><< <? echo $text['20'?></a></td>
    </tr>
  </table>
</center>

<?
            
}
            else
            {
                
$chars = array("a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z");
                
$code;

                for(
$c 0$c 12$c++)
                {
                    
srand((double)microtime() * 100000000000000);
                    
$pass $chars[rand(062)];
                    
$code $code.$pass;
                }

                
$query mysql_query("UPDATE " $table "_sites SET passreset = '" $code "', passreset2 = '" $_POST['new1'] . "' WHERE email = '" $_POST['email'] . "'") or die(mysql_error());

                
$message "Dear webmaster,\n<br>\n<br>You wanted to reset your password at out topsite, so this email has been send
                to give you the link to change your password because, if somebody want to change it the real owner of that account
                doesnt even know it. Thats why we give you the url below to (if you click it) change you password for real...\n<br>\n<br>
                &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a href=\"" 
"http://www.venforum.com" $_SERVER['PHP_SELF'] . "?reset=" $code "\">" "http://www.venforum.com" $_SERVER['PHP_SELF'] . "?reset=" $code "</a>\n<br>\n<br>
                Loki Lust V^^V\n<br>
                Webmaster " 
$webmaster_url "";

                
mail("" $_POST['email'] . "","Reset Password","$message","From: VEN topsite<" $webmaster_email ">\nContent-Type: text/html; charset=iso-8859-1");
?>

<center><br>
  <table border="1" cellpadding="2" cellspacing="0" width="50%" class="content">
    <tr class="title">
      <td width="100%"><p align="center"><? echo $text['99'?></td>
    </tr>
    <tr>
      <td width="100%"><? echo $text['101'?> ...
      <br><br><a href="index.php"><? echo $text['82'?> >></a></td>
    </tr>
  </table>
</center>

<?
            
}
        }
    }
    if(isset(
$_GET['reset']))
    {
        
$query mysql_query("SELECT * FROM " $table "_sites WHERE passreset = '" $_GET['reset'] . "'");
        
$result mysql_result(mysql_query("SELECT * FROM " $table "_sites WHERE passreset = '" $_GET['reset'] . "'"),0);

        if(!
$result)
        {
?>

<center><br>
  <table border="1" cellpadding="2" cellspacing="0" width="50%" class="content">
    <tr class="title">
      <td width="100%"><p align="center"><? echo $text['99'?></td>
    </tr>
    <tr>
      <td width="100%"><? echo $text['102'?> ...
      <br><br><a href="index.php"><? echo $text['82'?> >></a></td>
    </tr>
  </table>
</center>

<?
        
}
        else
        {
            while(
$row mysql_fetch_assoc($query))
            {
                
$new $row['passreset2'];
            }

            
$new_encrypted md5($new);

            
mysql_query("UPDATE " $table "_sites SET passreset = NULL, passreset2 = NULL, password = '" $new_encrypted "' WHERE passreset = '" $_GET['reset'] . "'") or die(mysql_error());
?>

<center><br>
  <table border="1" cellpadding="2" cellspacing="0" width="50%" class="content">
    <tr class="title">
      <td width="100%"><p align="center"><? echo $text['99'?></td>
    </tr>
    <tr>
      <td width="100%"><? echo $text['103'?> : <b><? echo $new ?></b>
      <br><br><? echo $text['104'?> ...
      <br><br><a href="index.php"><? echo $text['20'?> >></a></td>
    </tr>
  </table>
</center>

<?
        
}
    }
}
?>

  <table cellpadding="0" cellspacing="0" width="75%" align="center">
    <tr>
      <td width="100%"><br><hr style="border-style: dashed"></td>
    </tr>
  </table>

<?
$time 
$debug->endTimer();

echo 
"<center>";

echo 
"\n<br>Parsed in : " $time " seconds.";
echo 
"</center>";

include(
"footer.txt");
?>


Thanx

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingPHP Development > how to configure php.ini to send email via smtp which require password


Developer Shed Advertisers and Affiliates


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.

© 2003-2018 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap