<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Cahit Bodur</title>
    <description>The latest articles on Forem by Cahit Bodur (@cahit_bodur_2e6e03840ab6f).</description>
    <link>https://forem.com/cahit_bodur_2e6e03840ab6f</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3753657%2F0632b22c-e5af-45dd-9a2f-961f60e9c4a3.jpg</url>
      <title>Forem: Cahit Bodur</title>
      <link>https://forem.com/cahit_bodur_2e6e03840ab6f</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/cahit_bodur_2e6e03840ab6f"/>
    <language>en</language>
    <item>
      <title>How to Analyze SMTP Logs and Extract Email Traffic (PHP Script)</title>
      <dc:creator>Cahit Bodur</dc:creator>
      <pubDate>Sat, 28 Mar 2026 19:04:27 +0000</pubDate>
      <link>https://forem.com/cahit_bodur_2e6e03840ab6f/how-to-analyze-smtp-logs-and-extract-email-traffic-php-script-5nn</link>
      <guid>https://forem.com/cahit_bodur_2e6e03840ab6f/how-to-analyze-smtp-logs-and-extract-email-traffic-php-script-5nn</guid>
      <description>&lt;p&gt;Working with mail servers? Then you already know one thing:&lt;/p&gt;

&lt;p&gt;👉 SMTP logs are messy.&lt;/p&gt;

&lt;p&gt;When a client asks:&lt;/p&gt;

&lt;p&gt;“Can you send me only my email logs?”&lt;/p&gt;

&lt;p&gt;You’re stuck with a huge log file containing thousands of mixed records.&lt;/p&gt;

&lt;p&gt;In this post, I’ll show you a simple but powerful way to extract a specific email’s traffic from SMTP logs using PHP.&lt;/p&gt;

&lt;p&gt;🚨 The Problem&lt;/p&gt;

&lt;p&gt;SMTP logs are not structured per email.&lt;/p&gt;

&lt;p&gt;Instead, they look like this:&lt;/p&gt;

&lt;p&gt;SMTP-IN   63EBA13D...   20.57.&lt;em&gt;.79   EHLO&lt;br&gt;
SMTP-IN   63EBA13D...   20.57.&lt;/em&gt;.79   MAIL FROM&lt;br&gt;
SMTP-IN   63EBA13D...   20.57.&lt;em&gt;.79   RCPT TO:&lt;a href="mailto:user@example.com"&gt;user@example.com&lt;/a&gt;&lt;br&gt;
SMTP-IN   63EBA13D...   20.57.&lt;/em&gt;.79   DATA&lt;/p&gt;

&lt;p&gt;👉 Different emails are mixed together&lt;br&gt;
👉 Same IP continues the flow&lt;br&gt;
👉 Logs are split across multiple lines&lt;/p&gt;

&lt;p&gt;So filtering by email alone is not enough.&lt;/p&gt;

&lt;p&gt;💡 The Solution&lt;/p&gt;

&lt;p&gt;Here’s the trick:&lt;/p&gt;

&lt;p&gt;Find the line containing the target email&lt;br&gt;
Extract the IP address from that line&lt;br&gt;
Collect nearby lines with the same IP&lt;/p&gt;

&lt;p&gt;This reconstructs the full SMTP flow.&lt;/p&gt;

&lt;p&gt;⚙️ PHP Script&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="cp"&gt;&amp;lt;?php&lt;/span&gt;

&lt;span class="nv"&gt;$logFile&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;__DIR__&lt;/span&gt; &lt;span class="mf"&gt;.&lt;/span&gt; &lt;span class="s2"&gt;"/log/SMTP-Activity.log"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nv"&gt;$outputFile&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;__DIR__&lt;/span&gt; &lt;span class="mf"&gt;.&lt;/span&gt; &lt;span class="s2"&gt;"/log/output.log"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="nv"&gt;$targetMail&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"user@example.com"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nv"&gt;$range&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nv"&gt;$excludeIp&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"185.86.*.14"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="nv"&gt;$lines&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;file&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$logFile&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="no"&gt;FILE_IGNORE_NEW_LINES&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="no"&gt;FILE_SKIP_EMPTY_LINES&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="nv"&gt;$total&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;count&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$lines&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="nv"&gt;$out&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;fopen&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$outputFile&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"w"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$i&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nv"&gt;$i&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="nv"&gt;$total&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nv"&gt;$i&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;

    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;stripos&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$lines&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nv"&gt;$i&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt; &lt;span class="nv"&gt;$targetMail&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;!==&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;

        &lt;span class="nv"&gt;$parts&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;preg_split&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'/\t+/'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;$lines&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nv"&gt;$i&lt;/span&gt;&lt;span class="p"&gt;]);&lt;/span&gt;
        &lt;span class="nv"&gt;$ip&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;trim&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$parts&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;??&lt;/span&gt; &lt;span class="s1"&gt;''&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nv"&gt;$ip&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="nv"&gt;$ip&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="nv"&gt;$excludeIp&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;continue&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

        &lt;span class="nv"&gt;$start&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;max&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;$i&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="nv"&gt;$range&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
        &lt;span class="nv"&gt;$end&lt;/span&gt;   &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;min&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$total&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;$i&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nv"&gt;$range&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

        &lt;span class="nb"&gt;fwrite&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$out&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;$lines&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nv"&gt;$i&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="mf"&gt;.&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

        &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$j&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nv"&gt;$start&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nv"&gt;$j&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;=&lt;/span&gt; &lt;span class="nv"&gt;$end&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nv"&gt;$j&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;

            &lt;span class="nv"&gt;$p&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;preg_split&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'/\t+/'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;$lines&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nv"&gt;$j&lt;/span&gt;&lt;span class="p"&gt;]);&lt;/span&gt;
            &lt;span class="nv"&gt;$currentIp&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;trim&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$p&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;??&lt;/span&gt; &lt;span class="s1"&gt;''&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

            &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$currentIp&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="nv"&gt;$excludeIp&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;continue&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

            &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$currentIp&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="nv"&gt;$ip&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
                &lt;span class="nb"&gt;fwrite&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$out&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;$lines&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nv"&gt;$j&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="mf"&gt;.&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
            &lt;span class="p"&gt;}&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;

        &lt;span class="nb"&gt;fwrite&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$out&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="se"&gt;\n\n&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nb"&gt;fclose&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$out&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="k"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"Done!"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="cp"&gt;?&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;📌 What You Get&lt;br&gt;
Full SMTP flow for a specific email&lt;br&gt;
Clean, client-ready log output&lt;br&gt;
Faster debugging &amp;amp; analysis&lt;br&gt;
🎯 Use Cases&lt;br&gt;
Extract logs for a specific client&lt;br&gt;
Debug email delivery issues&lt;br&gt;
Detect brute-force login attempts&lt;br&gt;
Analyze spam behavior&lt;br&gt;
🔗 Full Tutorial (Detailed Explanation)&lt;/p&gt;

&lt;p&gt;If you want a step-by-step explanation with real examples:&lt;/p&gt;

&lt;p&gt;👉 &lt;a href="https://sizinsayfaniz.com/blog2/Kurumsal-Mail-Sunuculari-Icin-Php-Log-Analizi.html" rel="noopener noreferrer"&gt;https://sizinsayfaniz.com/blog2/Kurumsal-Mail-Sunuculari-Icin-Php-Log-Analizi.html&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;💻 GitHub Repository&lt;/p&gt;

&lt;p&gt;👉 &lt;a href="https://github.com/cahit2834/smtp-log-analiz-php" rel="noopener noreferrer"&gt;https://github.com/cahit2834/smtp-log-analiz-php&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;⚡ Final Thoughts&lt;/p&gt;

&lt;p&gt;SMTP logs look chaotic, but with the right approach, you can extract meaningful insights easily.&lt;/p&gt;

&lt;p&gt;If you're managing a mail server, this method will save you hours.&lt;/p&gt;

&lt;p&gt;⭐ If this helped you, consider starring the repo!&lt;/p&gt;

</description>
      <category>backend</category>
      <category>devops</category>
      <category>php</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Asterisk recording file wav to mp3</title>
      <dc:creator>Cahit Bodur</dc:creator>
      <pubDate>Tue, 17 Feb 2026 08:26:11 +0000</pubDate>
      <link>https://forem.com/cahit_bodur_2e6e03840ab6f/asterisk-recording-file-wav-to-mp3-4377</link>
      <guid>https://forem.com/cahit_bodur_2e6e03840ab6f/asterisk-recording-file-wav-to-mp3-4377</guid>
      <description>&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;function dosya_uzanti_oku($dosya_adi) {
return substr(strrchr($dosya_adi,'.'),1);
}

$sayi=0;
$conn =  @mysqli_connect(dbhost, dbuser, dbpass, dbnamecdr);
$GLOBALS["db"] =  @mysqli_connect(dbhost, dbuser, dbpass, dbnamecdr);
$sql = "SELECT * FROM  cdr where 
CHAR_LENGTH(recordingfile)&amp;gt;2 and recordingfile LIKE '%.wav'       
order by calldate 
desc Limit 0,500";
$result = @mysqli_query($db, $sql); 
while($row = @mysqli_fetch_assoc($result)) 
{

$tarih=$row[calldate];
$tarih = explode('-',$tarih);
$gun=$tarih[2];
$gun= explode(' ',$gun);

$recordingfile=$row["recordingfile"];
$kontrol=dosyakontrol($recordingfile,"/var/");  
        $dosyaadi='recording/'.$tarih[0].'/'.$tarih[1].'/'.$gun[0].'/'.$row['recordingfile'];
//echo $dosyaadi;echo "&amp;lt;br&amp;gt;";

if($kontrol=="var")
{                   $dosyaadi=dosyacevir($row["recordingfile"]);                    $uzanti=dosya_uzanti_oku("$dosyaadi");
echo $uzanti;
$dosyaboyutham= round(filesize("$dosyaadi"));
$dosyatarih =$row[recordingfile];
$dosyatarih = explode('/',$dosyatarih);
$dosyaadikaydedilecek=wavmp3($dosyatarih[8]);               $dosyaadifile='recording/'.$tarih[0].'/'.$tarih[1].'/'.$gun[0].'/'.$dosyaadikaydedilecek;
if($uzanti=="wav" and $dosyaboyutham&amp;gt;1)
{
echo $sayi; echo " ";
echo $dosyaadi;
echo $dosyaadifile;
echo "-+-";
echo $dosyaadikaydedilecek;
echo "&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;";

exec( "lame --cbr -b 12k $dosyaadi $dosyaadifile" ,$output, $return);
if (!$return) {
$sqld = "UPDATE cdr
SET recordingfile='$dosyaadikaydedilecek'  WHERE recordingfile='$recordingfile'";   
if ($GLOBALS["db"]-&amp;gt;query($sqld) === FALSE) {
echo "Error: " . $sqld . "&amp;lt;br&amp;gt;" . $GLOBALS["db"]-&amp;gt;error;}unlink("$dosyaadi");
} else {
echo "cevrilemedi";
}               
}

}else{
$uzanti=dosya_uzanti_oku("$dosyaadi");
//echo $uzanti;
$dosyaboyutham= round(filesize("$dosyaadi"));               $dosyaadikaydedilecek=wavmp3($row['recordingfile']);            $dosyaadifile='recording/'.$tarih[0].'/'.$tarih[1].'/'.$gun[0].'/'.$dosyaadikaydedilecek;
if($uzanti=="wav" and $dosyaboyutham&amp;gt;1)
{
echo $sayi; echo " ";
echo $dosyaadi;
echo $dosyaadifile;
echo "---";
echo $dosyaadikaydedilecek;
echo "&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;";
exec( "lame --cbr -b 12k $dosyaadi $dosyaadifile" ,$output, $return);
if (!$return) {
$sqld = "UPDATE cdr
SET recordingfile='$dosyaadikaydedilecek'  WHERE recordingfile='$recordingfile'";   
if ($GLOBALS["db"]-&amp;gt;query($sqld) === FALSE) {
echo "Error: " . $sqld . "&amp;lt;br&amp;gt;" . $GLOBALS["db"]-&amp;gt;error;}
unlink("$dosyaadi");
} else {
echo "cevrilemedi";
}

}
}
$sayi=$sayi+1;  
}
echo "&amp;lt;br&amp;gt;---&amp;lt;br&amp;gt;";
$conn =  @mysqli_connect(dbhost, dbuser, dbpass, dbnamecdr);
$GLOBALS["db"] =  @mysqli_connect(dbhost, dbuser, dbpass, dbnamecdr);
$sql = "SELECT * FROM  cdr  where CHAR_LENGTH(recordingfile)&amp;lt;2   and  calldate&amp;gt;'$bugun' and calldate&amp;lt;'$yarin' 
order by calldate 
desc Limit 0,500";
$result = @mysqli_query($conn, $sql);   
while($row = @mysqli_fetch_assoc($result))  {
$recordingfile="";
$uni=$row["uniqueid"];
$sql2 = "SELECT * FROM cdr where    
CHAR_LENGTH(recordingfile)&amp;gt;2 and uniqueid='$uni'  and  calldate&amp;gt;'$bugun' and calldate&amp;lt;'$yarin'        
order by calldate 
desc Limit 0,1";
$result2 = @mysqli_query($conn, $sql2); 
$row2 = @mysqli_fetch_assoc($result2);

echo $row["src"];
echo " - ";
echo $row["uniqueid"];
echo " - ";
echo $row2["recordingfile"];
$recordingfile=$row2["recordingfile"];          
         $kayitguncelle=guncelle("cdr","recordingfile='$recordingfile'","uniqueid='$uni' and  calldate&amp;gt;'$bugun' and calldate&amp;lt;'$yarin'   ");
echo "&amp;lt;br&amp;gt;";
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;issabel pbx calls recording files wav to mp3 convertor&lt;br&gt;
The code I use to fix file directory errors in SQL call logs requires LAME to be installed; you can set it to run every 15 minutes in the scheduled tasks.&lt;/p&gt;

&lt;p&gt;buyatek sizinsayfaniz.com&lt;/p&gt;

</description>
      <category>automation</category>
      <category>php</category>
      <category>sql</category>
    </item>
    <item>
      <title>Classic ASP Sending emails from your own server.</title>
      <dc:creator>Cahit Bodur</dc:creator>
      <pubDate>Wed, 04 Feb 2026 19:57:48 +0000</pubDate>
      <link>https://forem.com/cahit_bodur_2e6e03840ab6f/classic-asp-sending-emails-from-your-own-server-1p8n</link>
      <guid>https://forem.com/cahit_bodur_2e6e03840ab6f/classic-asp-sending-emails-from-your-own-server-1p8n</guid>
      <description>&lt;p&gt;Benim gibi eski classic asp kullananlar için, kendi mail sunucularını kullanarak sitelerinden mail gönderebilmeleri için gerekli kodlar.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Dim iMsg, iConf, Flds

Set iMsg = CreateObject("CDO.Message")
Set iConf = CreateObject("CDO.Configuration")
Set Flds = iConf.Fields

schema = "http://schemas.microsoft.com/cdo/configuration/"
Flds.Item(schema &amp;amp; "sendusing") = 2
Flds.Item(schema &amp;amp; "smtpserver") = "mail.sunucuadresiniz.com" 
Flds.Item(schema &amp;amp; "smtpserverport") = 587
Flds.Item(schema &amp;amp; "smtpauthenticate") = 1
Flds.Item(schema &amp;amp; "sendusername") = "info@kendimailadresiniz.com"
Flds.Item(schema &amp;amp; "sendpassword") =  "mailsifreniz"
Flds.Item(schema &amp;amp; "smtpusessl") = 0

Flds.Update

With iMsg

.To = "mailgönderilicekadres@adres.com" 
.From = "info@kendimailadresiniz.com"
.Subject = "Mail Konusu"
.HTMLBody = body
.Sender = "info@kendimailadresiniz.com"
.Organization = ""
.ReplyTo = "info@kendimailadresiniz.com"

.Server = "mail.sunucuadresiniz.com" 
.Username = "info@kendimailadresiniz.com"
.Password =  "mailsifreniz"

Set .Configuration = iConf
SendEmailGmail = .Send
End With

set iMsg = nothing
set iConf = nothing
set Flds = nothing
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Detaya ihtiyacınız olursa bloğumdaki yazıyıda kontrol edebilirsiniz.&lt;br&gt;
&lt;a href="https://sizinsayfaniz.com/blog2/Classic-Asp-Ile-Kurumsal-Mail-Adresinizden-Mail-Gondermek.html" rel="noopener noreferrer"&gt;https://sizinsayfaniz.com/blog2/Classic-Asp-Ile-Kurumsal-Mail-Adresinizden-Mail-Gondermek.html&lt;/a&gt;&lt;/p&gt;

</description>
      <category>backend</category>
      <category>microsoft</category>
      <category>tutorial</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
