[Linux-programlama] Re: Linux-programlama Toplu Mesajı, Sayı 54, Konu 43

---------

[Linux-programlama] Re: Linux-programlama Toplu Mesajı, Sayı 54, Konu 43

From: gaffar durmaz <go_at_gaffarovercomes.com>
Date: Fri, 27 Mar 2009 19:23:45 +0200
Message-Id: <1238174625.6331.2.camel@gaffarovercomes>

evet bunu daha önceden yapmýþtým
python programlama dili ile mail hesabýndan pop3 ile okuma yapmak ;))

**********************************************************
# !/usr/bin/python
import sys,string
import poplib, email

def getMail(host, user, passwd, deletion = 0):
    pop3 = poplib.POP3(host)
    pop3.user(user)
    pop3.pass_(passwd)

    try :
        num = len(pop3.list()[1])
    except:
        print "connection error with pop3.."
        sys.exit()
        
    print user, "has", num, "messages"

    format = "%-5s %-40s %s"

    if num > 0:
        if deletion:
            print "Deleting", num, "messages",
            for i in range(1, num+1):
                pop3.dele(i)
                print ".",
            print " done."
        else:
            print format % ("Num", "From", "Subject")
            for i in range(1, num+1):
                str = string.join(pop3.top(i, 1)[1], "\n")
                msg = email.message_from_string(str)
                print format % (i, msg["From"], msg["Subject"])
            
    pop3.quit()

# the program starts heree...
if __name__ =='__main__':
    host = "" # ur host name
    user = "" # ur username
    passwd = "" # ur password
    
    getMail(host,user,passwd) # get with my function

******************************************************************
# gaffar overcomes

On Fri, 2009-03-27 at 14:11 +0200,
linux-programlama-request_at_liste.linux.org.tr wrote:
> Linux-programlama listesi mesajlarýný þu adrese gönderin:
> linux-programlama_at_liste.linux.org.tr
>
> World Wide Web ile üye olmak veya üyelikten çýkmak için þu sayfayý
> ziyaret edin:
> http://liste.linux.org.tr/mailman/listinfo/linux-programlama
> veya e-posta yoluyla konusunda veya gövdesinde 'help' yazan bir mesajý
> þu adrese gönderin:
> linux-programlama-request_at_liste.linux.org.tr
>
> Bu listeyi yöneten kiþiye þu adresten ulaþabilirsiniz:
> linux-programlama-owner_at_liste.linux.org.tr
>
> Yanýt yazarken, lütfen Konu satýrýný düzenleyerek þu tür bir þekilden
> daha belirli olmasýný saðlayýn: "Ynt: Linux-programlama toplu
> mesajýnýn içeriði..."
>
>
>
> Günün Konularý:
>
> 1. POP3, IMAP kurulumu ile ilgili (Guychmyrat Amanmyradov)
> 2. $HTTP_RAW_POST_DATA (Gamze Tepe)
> 3. Re: $HTTP_RAW_POST_DATA (Hasan Sertçelik)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Fri, 27 Mar 2009 10:36:11 +0000 (GMT)
> From: Guychmyrat Amanmyradov <guychmyrat_at_yahoo.com.tr>
> Subject: [Linux-programlama] POP3, IMAP kurulumu ile ilgili
> To: linux-programlama_at_liste.linux.org.tr
> Message-ID: <75474.96260.qm_at_web27008.mail.ukl.yahoo.com>
> Content-Type: text/plain; charset="utf-8"
>
> Eðer bu foruma bu konuyu göndermemen gerekiyorsa, kusura bakmayýn.
> Aranýzda bu konuda tecrübeli olduðunu düþünüyorum.
>
> Ubuntu servera sendmail kurdum.
>
> sendmail abc_at_abd.com
> mesaj
> Ctrl + D
>
> ile mesajýmý gönderebiliyorum. Gidiyorda.
>
> Þimdi, info_at_abc.com þeklinde kullanýcýlar nasýl oluþturabilirim?
> sonra oluþturduðum kullanýcýlar POP3 / IMAP ile kendilerine gelen emailleri nasýl okuta bilirim?
>
> bununla ilgili kaynak gösterirseniz de memnun olurum.
>
> Sendmail kitaplarýnda anlatýlmýyor da.
>
> Teþekkür ederim.
>
>
>
>
>
> ___________________________________________________________________
> Yahoo! Türkiye açýldý! http://yahoo.com.tr
> Ýnternet üzerindeki en iyi içeriði Yahoo! Türkiye sizlere sunuyor!
> -------------- sonraki b? --------------
> Bir HTML eklentisi temizlendi...
> URL: http://liste.linux.org.tr/pipermail/linux-programlama/attachments/20090327/59ee1320/attachment-0001.htm
>
> ------------------------------
>
> Message: 2
> Date: Fri, 27 Mar 2009 12:56:45 +0100
> From: "Gamze Tepe" <GTepe_at_incentro.at>
> Subject: [Linux-programlama] $HTTP_RAW_POST_DATA
> To: <linux-programlama_at_liste.linux.org.tr>
> Message-ID:
> <4C4A39FAF3C320439D107BCF2571725201B3833F_at_sintvie003.integro.ent>
> Content-Type: text/plain; charset="iso-8859-1"
>
> Merhaba,
>
> Daha önce PHP 4.3.11 üzerinde calisan bir uygulamayi PHP 5.1.2 yüklü olan bir makinaya almak zorunda kaldik. Su an bazi degiskenler calismiyor.
>
> Bunlardan ilki
>
> $HTTP_RAW_POST_DATA;
>
> DOMXML'in de PHP 5 ile calismadigini gördüm. Bunun icin ara bir php scripti buldum. Daha sonra baska bir hata mesaji ile karsilastim.
>
> DOMDocument::loadXML() [<a href='function.loadXML'>function.loadXML</a>]: Empty string supplied as input in /sites/incentro/ips/htdocs/iPS/domxml-php4-to-php5.php</b> on line <b>72</b><
>
>
> domxml-php4-to-php5.php dosyasi benim internette buldugum ara kod.
>
> Bu hata mesajini su scriptten aliyorum:
>
> <?php
> require_once("common.php");
> require_once("common/request_xml.php");
>
> function get_session(&$error)
> {
> global $config, $log;
> global $HTTP_RAW_POST_DATA;
>
>
> $log->write(LOG_SEVERITY_INFO, "Received 'get_session' request from '{$_SERVER["REMOTE_ADDR"]}:{$_SERVER["REMOTE_PORT"]}':"
> . str_replace("\n", "\n ", "\n$HTTP_RAW_POST_DATA"));
>
> header("Content-type: text/xml");
>
> $request = new RequestXML();
>
> if ($request->create($HTTP_RAW_POST_DATA, $error) === false)
> return (false);
> .
> .
> .
> ......
>
> ?>
>
> request.php
> <?php
>
> function create($xml,&$error)
> {
> if (($dom = domxml_open_mem($xml)) === false) {
> $error = new Error(E_REQUEST_PARSE_XML);
> return (false);
> }
> ........
> ?>
>
>
> Hatanin sebebi $HTTP_RAW_POST_DATA degerinin bos olmasi. Bu degeri nasil elde edebilirim?
> php.ini dosyasinda
>
> always_populate_raw_post_data <http://at.php.net/manual/en/ini.core.php#ini.always-populate-raw-post-data> degiskenini On yapip apache'yi restart ettim ama calismadi.
>
> $GLOBALS['HTTP_RAW_POST_DATA'] = file_get_contents("php://input");
>
> denedim olmadi.
>
> Bir fikri olan var mi?
> -------------- sonraki bölüm --------------
> Bir HTML eklentisi temizlendi...
> URL: http://liste.linux.org.tr/pipermail/linux-programlama/attachments/20090327/aebcf2b9/attachment-0001.htm
>
> ------------------------------
>
> Message: 3
> Date: Fri, 27 Mar 2009 14:11:03 +0200
> From: Hasan Sertçelik <hasan_at_sertcelik.net>
> Subject: [Linux-programlama] Re: $HTTP_RAW_POST_DATA
> To: Özgür yazýlýmlarla çeþitli dillerde yazýlým geliþtirme
> <linux-programlama_at_liste.linux.org.tr>
> Message-ID: <49CCC257.3010702_at_sertcelik.net>
> Content-Type: text/plain; charset="utf-8"
>
> $HTTP_RAW_POST_DATA iþlenmemiþ post verisini tutar.
> print_r($_POST) ile veriye ulaþmayý denedinizmi.
>
>
>
> Gamze Tepe yazmýþ:
> > Merhaba,
> >
> > Daha önce PHP 4.3.11 üzerinde calisan bir uygulamayi PHP 5.1.2 yüklü
> > olan bir makinaya almak zorunda kaldik. Su an bazi degiskenler calismiyor.
> >
> > Bunlardan ilki
> >
> > $HTTP_RAW_POST_DATA;
> >
> > DOMXML'in de PHP 5 ile calismadigini gördüm. Bunun icin ara bir php
> > scripti buldum. Daha sonra baska bir hata mesaji ile karsilastim.
> >
> > DOMDocument::loadXML() [<a
> > href='function.loadXML'>function.loadXML</a>]: Empty string supplied
> > as input in /sites/incentro/ips/htdocs/iPS/domxml-php4-to-php5.php</b>
> > on line <b>72</b><
> >
> >
> > domxml-php4-to-php5.php dosyasi benim internette buldugum ara kod.
> >
> > Bu hata mesajini su scriptten aliyorum:
> >
> > <?php
> > require_once("common.php");
> > require_once("common/request_xml.php");
> >
> > function get_session(&$error)
> > {
> > global $config, $log;
> > global $HTTP_RAW_POST_DATA;
> >
> >
> > $log->write(LOG_SEVERITY_INFO, "Received 'get_session' request from
> > '{$_SERVER["REMOTE_ADDR"]}:{$_SERVER["REMOTE_PORT"]}':"
> > . str_replace("\n", "\n ", "\n$HTTP_RAW_POST_DATA"));
> >
> > header("Content-type: text/xml");
> >
> > $request = new RequestXML();
> >
> > if ($request->create($HTTP_RAW_POST_DATA, $error) === false)
> > return (false);
> > .
> > .
> > .
> > ......
> >
> > ?>
> >
> > request.php
> > <?php
> >
> > function create($xml,&$error)
> > {
> > if (($dom = domxml_open_mem($xml)) === false) {
> > $error = new Error(E_REQUEST_PARSE_XML);
> > return (false);
> > }
> > ........
> > ?>
> >
> >
> > Hatanin sebebi $HTTP_RAW_POST_DATA degerinin bos olmasi. Bu degeri
> > nasil elde edebilirim?
> > php.ini dosyasinda
> >
> > always_populate_raw_post_data
> > <http://at.php.net/manual/en/ini.core.php#ini.always-populate-raw-post-data> degiskenini
> > On yapip apache'yi restart ettim ama calismadi.
> >
> > $GLOBALS['HTTP_RAW_POST_DATA'] = file_get_contents("php://input");
> >
> > denedim olmadi.
> >
> > Bir fikri olan var mi?
> > ------------------------------------------------------------------------
> >
> > _______________________________________________
> > Linux-programlama mailing list
> > Linux-programlama_at_liste.linux.org.tr
> > http://liste.linux.org.tr/mailman/listinfo/linux-programlama
> >
>
> -------------- sonraki b? --------------
> Bir HTML eklentisi temizlendi...
> URL: http://liste.linux.org.tr/pipermail/linux-programlama/attachments/20090327/2fc6dac9/attachment.htm
>
> ------------------------------
>
> _______________________________________________
> Linux-programlama mailing list
> Linux-programlama_at_liste.linux.org.tr
> http://liste.linux.org.tr/mailman/listinfo/linux-programlama
>
>
> Son: Linux-programlama Toplu Mesajý, Sayý 54, Konu 43
> *****************************************************

_______________________________________________
Linux-programlama mailing list
Linux-programlama_at_liste.linux.org.tr
http://liste.linux.org.tr/mailman/listinfo/linux-programlama
Received on Fri 27 Mar 2009 - 18:05:28 EET

---------

Bu arsiv hypermail 2.2.0 tarafindan uretilmistir.