亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? smtp.tcl

?? windml3.0.3
?? TCL
字號:
# SMTP.TCL - sent mail routine
#
# Copyright 1996 Wind River Systems, Inc.
#
# modification history
# -----------------------
# 02b,05mar02,bwd  Modified SETUP to be non-tornado centric
# 02a,12jun01,j_w  Added for Tornado 2.2
# 01a,19apr96,sks  written.
#

#########
#
# smtpMailSend - Using the Tclized socket interface provided in the
# "GensockTcl.dll", this routine sends e-mail via the SMTP protocol.
# Arguments include:
#
#    sender - "From:" name of the SMTP sender
#    toList - "To:" a list containing SMTP recipent addresses
#    ccList - "Cc:" a list containing SMTP "Cc:" recipent addresses
#    bccList - "Bcc" a list containing SMTP "Bcc:" (blind) recipent addresses
#    subject - the subject line for the message
#    msgContents - the name of the file containing the message to be sent
#    server - the SMTP server name
#    attachmentList - a list of files to be attached
#

proc smtpMailSend {mailDate sender toList ccList bccList subject    \
                   msgContents server attachmentList} {
    global setupVals

    set error ""
    set msgFile ""
    set smtpSocket ""

    if {$error == ""} {
        # Connect to the SMTP server

        if {[catch {gensockConnect $server "smtp"} smtpSocket] && \
            [catch {gensockConnect $server "25"} smtpSocket]} {

            set error "unable to connect to SMTP server '$server'"
            puts "Error: $smtpSocket"
            set smtpSocket ""
        }
    }

    if {$error == ""} {
        # The first line from the SMTP server should be "220".

        if {[catch "gensockGetLine $smtpSocket" response] || \
            ![string match "220*" $response]} {

            set error "SMTP server error: $response"
        }
    }

    if {$error == ""} {
        # Fetch the name of this host to be provided to the SMTP server.

        set thisHostName [gensockGetHostname]

        # "Login" to the SMTP server and response should be "250".

        set message "HELO $thisHostName\r\n"

        if {[catch {gensockPutData $smtpSocket $message [string length $message]} \
             response] || [catch {gensockGetLine $smtpSocket} response] || \
            ![string match "250*" $response]} {

            set error "SMTP server error: $response"
         }
    }

    if {$error == ""} {
        # Announce the sender and the response should be "250".

        set message "MAIL From:<$sender>\r\n"

        if {[catch {gensockPutData $smtpSocket $message [string length $message]} \
             response] || [catch {gensockGetLine $smtpSocket} response] || \
            ![string match "250*" $response]} {

            set error "SMTP server does not recognize '$sender': $response"
        }
    }

    if {$error == ""} {
        set recipients [concat $toList $ccList $bccList]

        # Send each recipient name in 'recipients'; for each the response should be "250".

        for {set i 0} {$i < [llength $recipients]} {incr i} {
            if {$error == ""} {
                set recipient [lindex $recipients $i]
                set message "RCPT To: <$recipient>\r\n"

                if {[catch {gensockPutData $smtpSocket $message [string length $message]}\
                    response] || [catch {gensockGetLine $smtpSocket} response] || \
                    ![string match "250*" $response]} {

                    set error "SMTP server does not like '$recipient': $response"
                }
            }
        }
    }

    if {$error == ""} {
        # Announce the sender and the response should be "354".

        set message "DATA\r\n"

        if {[catch {gensockPutData $smtpSocket $message [string length $message]} \
             response] || [catch {gensockGetLine $smtpSocket} response] || \
            ![string match "354*" $response]} {

            set error "SMTP not accepting message data: $response"
        }
    }

    if {$error == ""} {
        # Put the header portion of "DATA" together.

        set header ""

        # First the "Date:" field.
        append header "Date: $mailDate\n"

        # Next the "From:" field.
        append header "From: [lindex $sender 0]\n"

        # Next the "Subject:" field.
        append header "Subject: $subject\n"

        # Next the "To:" field.
        if {[llength $toList] == "1"} {
            append header "To: [lindex $toList 0]\n"
        } else {
            append header "To: $toList\n"
        }

        # Next the "Cc:" field, if it exists.
        if {[string length $ccList]} {
            if {[llength $ccList] == "1"} {
                append header "Cc: [lindex $ccList 0]\n"
            } else {
                append header "Cc: $ccList\n"
            }
        }

        # Next the "X-Mailer:" field.
        append header "X-Mailer: <[getProdInfo name] Setup>\n"

        # Terminate the header with "\n"
        append header "\n"

        # Send the header.
        if {[catch {gensockPutDataBuffered $smtpSocket $header \
                      [string length $header]} response]} {

            set error "SMTP socket write error: '$response'"
        }
    }

    if {$error == ""} {
        # Put the body of the message together and send it.

        foreach line $msgContents {
            # If the line starts with a ".", make it start with *two* dots.

            if {[string index $line 0] == "."} {
                set line [format ".%s" $line]
            }

            # Substitute multiple line breaks ("\r") with single \r.
            regsub -all \r+ $line \r line

            set message "$line\n"
            if {[catch {gensockPutDataBuffered $smtpSocket $message \
                          [string length $message]} response]} {

                set error "SMTP socket write error: '$response'"
                break
            }
        }
    }

    if {$error == ""} {
        # UUEncode each attachment and send each one individually.

        foreach attachment $attachmentList {
            # UUEncode '$attachment'

            if [catch {uuencode $attachment \
                       [file tail $attachment]} tmpFilename] {
                set error $tmpFilename
                break
            }
            # Open the UUEncoded file.

            if [catch {open $tmpFilename r} tmpFile] {
                set error "unable to open temp. file $tmpfilename"
                break;
            }
            # Place a couple of blank lines before each attachment.

            if {[catch {gensockPutDataBuffered $smtpSocket \
                          "\r\n\r\n" 4} response]} {
                set error "SMTP socket write error: '$response'"
                break;
            }
            # Write the entire contents of the UUEncoded file to SMTP socket.

            set tmpFileContents [split [read $tmpFile] \n]

            foreach line $tmpFileContents {

                # If the line starts with a ".", make it start with *two* dots.

                if {[string index $line 0] == "."} {
                    set line [format ".%s" $line]
                }
                if [catch {gensockPutDataBuffered $smtpSocket "$line\n" \
                              [expr [string length $line] + 1]} response] {

                    set error "SMTP socket write error: '$response'"
                    break
                }
            }
            close $tmpFile

            file delete $tmpFilename

            gensockFlushBufferedData $smtpSocket
        }
    }

    if {$error == ""} {
        # Terminate the DATA section with a final "." surrounded by new-lines.

        set message "\r\n.\r\n"
        if {[catch {gensockPutDataBuffered $smtpSocket $message \
                      [string length $message]} response]} {

            set error "SMTP socket write error: '$response'"
        } {
            gensockFlushBufferedData $smtpSocket
        }
    }

    if {$error == ""} {
        # "Logoff" the SMTP server and response should be "250".

        set message "QUIT\r\n"

        if {[catch {gensockPutData $smtpSocket $message [string length $message]} \
             response] || [catch {gensockGetLine $smtpSocket} response] || \
            ![string match "250*" $response]} {

            set error "SMTP server error: $response"
        }
    }

    # Close away the message file handle.

    if {$msgFile != ""} {
        close $msgFile
    }

    # Close away the SMTP socket.

    if {$smtpSocket != ""} {
        gensockClose $smtpSocket
    }

    if {$error != ""} {
        error $error
    }
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产欧美综合在线观看第十页 | 日韩美女视频一区二区| 67194成人在线观看| 欧美色欧美亚洲另类二区| 色综合天天综合网天天看片| 91麻豆.com| 色菇凉天天综合网| 欧美四级电影在线观看| 8v天堂国产在线一区二区| 在线91免费看| 国产亚洲一区二区在线观看| 久久精品视频一区| 国产精品美女久久久久aⅴ国产馆| 国产精品视频免费看| 亚洲欧洲成人av每日更新| 亚洲综合图片区| 日韩激情中文字幕| 国产成人精品1024| 欧美午夜精品免费| 精品久久久久一区| 中文字幕亚洲一区二区av在线| 亚洲欧美一区二区在线观看| 亚洲一区二区四区蜜桃| 美女mm1313爽爽久久久蜜臀| 成人午夜短视频| 欧美午夜宅男影院| 欧美成人猛片aaaaaaa| 国产精品理论片| 人人精品人人爱| 成人国产在线观看| 91麻豆精品国产无毒不卡在线观看| 精品国产制服丝袜高跟| 亚洲人成网站在线| 久久精品理论片| 色一情一乱一乱一91av| 欧美大片在线观看一区| 国产精品不卡视频| 蜜桃久久av一区| 色婷婷av一区二区三区软件 | 日韩免费一区二区| 亚洲美女视频一区| 国模冰冰炮一区二区| 色婷婷精品大在线视频| 精品成人a区在线观看| 亚洲天堂久久久久久久| 国产一区二区久久| 制服丝袜亚洲播放| 日韩毛片高清在线播放| 国产一区二区不卡在线| 3atv一区二区三区| 亚洲综合网站在线观看| 97久久久精品综合88久久| 久久亚区不卡日本| 日韩激情一区二区| 欧美日韩国产美女| 一卡二卡三卡日韩欧美| 成年人午夜久久久| 久久这里只有精品首页| 日韩—二三区免费观看av| 在线观看日韩电影| 亚洲女爱视频在线| 99热在这里有精品免费| 久久久不卡影院| 国产呦萝稀缺另类资源| 欧美不卡123| 久久国产精品免费| 日韩精品资源二区在线| 免费观看30秒视频久久| 91精品国产综合久久久久久漫画| 亚洲国产综合在线| 欧美三级视频在线观看| 天天色 色综合| 欧美人牲a欧美精品| 日韩福利电影在线| 日韩免费高清视频| 国产一区二区三区精品视频| 久久亚洲精品小早川怜子| 国产在线视频一区二区| 久久亚洲一级片| 国v精品久久久网| 国产精品黄色在线观看| av午夜一区麻豆| 伊人婷婷欧美激情| 精品视频在线视频| 日本不卡的三区四区五区| 欧美成人aa大片| 国产91在线|亚洲| 亚洲人成精品久久久久| 欧美色图在线观看| 视频一区二区三区中文字幕| 日韩一区二区麻豆国产| 国产精品伊人色| 中文字幕一区不卡| 欧美另类高清zo欧美| 国产最新精品免费| 亚洲欧美在线高清| 91精品国产91久久久久久一区二区| 蓝色福利精品导航| 1区2区3区国产精品| 欧美日高清视频| 国产一区二区福利视频| 亚洲狠狠丁香婷婷综合久久久| 欧美一区中文字幕| 国产福利一区在线| 亚洲一卡二卡三卡四卡无卡久久 | 精品日韩在线观看| av不卡在线观看| 日韩精品成人一区二区三区| 国产视频一区在线观看 | 精品国产髙清在线看国产毛片| 国产高清不卡一区二区| 午夜久久久久久久久久一区二区| 日韩一区和二区| 一本一道久久a久久精品| 日韩精品国产精品| 亚洲欧洲中文日韩久久av乱码| 欧美成va人片在线观看| 欧美亚洲另类激情小说| 国产美女娇喘av呻吟久久| 亚洲一区二区三区国产| 国产欧美综合在线| 日韩精品专区在线影院重磅| 在线日韩国产精品| 成人免费视频播放| 激情都市一区二区| 婷婷综合五月天| 亚洲免费观看高清完整版在线观看熊| 欧美成人午夜电影| 国产区在线观看成人精品 | 国产视频一区在线观看| 99精品久久99久久久久| 久久99精品国产麻豆婷婷| 蜜臀av一区二区在线观看| 国产福利一区二区三区| 日本不卡一二三区黄网| 韩国中文字幕2020精品| 99久久婷婷国产综合精品电影 | 国产精品888| 99久精品国产| 欧美日韩午夜在线| 日韩三级视频在线看| 精品国产麻豆免费人成网站| 国产欧美日韩中文久久| 亚洲综合视频在线| 精品一区精品二区高清| 97久久人人超碰| 91精品国产黑色紧身裤美女| 中文字幕第一区综合| 亚洲高清视频的网址| 国产麻豆精品theporn| 91麻豆123| 精品国产一区二区在线观看| 亚洲色欲色欲www| 日本vs亚洲vs韩国一区三区二区| 国产成人一区在线| 制服丝袜激情欧洲亚洲| 国产精品福利一区二区| 天天免费综合色| 91在线观看视频| 精品欧美乱码久久久久久 | 欧美视频一二三区| 久久中文娱乐网| 亚洲444eee在线观看| 国产不卡视频在线观看| 欧美美女激情18p| 中文字幕的久久| 另类小说视频一区二区| 欧美在线观看禁18| 欧美国产97人人爽人人喊| 日韩av网站在线观看| 色av综合在线| 国产精品视频一二三| 国产一区欧美二区| 3atv一区二区三区| 亚洲国产一区二区三区| 成人黄色大片在线观看| 精品精品欲导航| 全部av―极品视觉盛宴亚洲| 在线观看一区二区视频| 国产精品麻豆网站| 国产成人免费视频精品含羞草妖精| 欧美高清性hdvideosex| 亚洲一区二区三区中文字幕| 不卡一区二区三区四区| 久久久久99精品国产片| 久久不见久久见免费视频7| 欧美久久久久久久久| 亚洲成av人片在线| 在线观看国产日韩| 亚洲三级在线免费观看| 成人一区在线观看| 中文字幕在线不卡一区二区三区| 国产乱码精品一区二区三| wwwwxxxxx欧美| 国产美女一区二区三区| 久久―日本道色综合久久| 韩国av一区二区| 久久久久国色av免费看影院| 国产福利一区二区三区视频| 中文字幕av一区二区三区免费看 |