亚洲免费乱码视频,日韩 欧美 国产 动漫 一区,97在线观看免费视频播国产,中文字幕亚洲图片

      1. <legend id="ppnor"></legend>

      2. 
        
        <sup id="ppnor"><input id="ppnor"></input></sup>
        <s id="ppnor"></s>

        Perl批量下載Gmail附件的代碼

        字號:


            這篇文章主要介紹了Perl批量下載Gmail附件的代碼,本文重點(diǎn)在使用Mail::POP3Client模塊和Gmail通信的方法,需要的朋友可以參考下。
            最近在寫一個從gmail批量下載附件的程序,用到了Mail::POP3Client和MIME::Parser2個模塊
            實(shí)現(xiàn)代碼:
            代碼如下:
            useMail::POP3Client;
            useMIME::Parser;
            my$U='User.Name@gmail.com';
            my$P='uSeR.pAsSwORd';
            my$X=newMIME::Parser;
            $X->output_dir('C:\\download');#directorytosaveattachment
            my$G=Mail::POP3Client->new(
            USER=>$U,
            PASSWORD=>$P,
            HOST=>'pop.gmail.com',
            PORT=>995,
            USESSL=>'true')ordie"Can'tConnectTheServer.\n";
            for$i(1..$G->Count())
            {
            my$C=$G->HeadAndBody($i);
            my$R=$X->parse_data($C);
            }
            $G->Close();