搜索了原来的贴子,但没有完整的代码
那位有收取邮件的完整代码,包括解码、附件。贴过来,不胜感激解码信息
Friend Function DecodeBase64String(str2Decode As String) As String'******************************************************************************
'
' Synopsis:     Decode a Base 64 string
'
' Parameters:   str2Decode  - The base 64 encoded input string
'
' Return:       decoded string
'
' Description:
'   Coerce 4 base 64 encoded bytes into 3 decoded bytes by converting 4, 6 bit
'   values (0 to 63) into 3, 8 bit values. Transform the 8 bit value into its
'   ascii character equivalent. Stop converting at the end of the input string
'   or when the first '=' (equal sign) is encountered.
'
'******************************************************************************Dim lPtr            As Long
Dim iValue          As Integer
Dim iLen            As Integer
Dim iCtr            As Integer
Dim Bits(1 To 4)    As Byte
Dim strDecode       As String' for each 4 character group....
For lPtr = 1 To Len(str2Decode) Step 4
    iLen = 4
    For iCtr = 0 To 3
        ' retrive the base 64 value, 4 at a time
        iValue = InStr(1, BASE64CHR, Mid$(str2Decode, lPtr + iCtr, 1), vbBinaryCompare)
        Select Case iValue
            ' A~Za~z0~9+/
            Case 1 To 64: Bits(iCtr + 1) = iValue - 1
            ' =
            Case 65
                iLen = iCtr
                Exit For
            ' not found
            Case 0: Exit Function
        End Select
    Next
    
    ' convert the 4, 6 bit values into 3, 8 bit values
    Bits(1) = Bits(1) * &H4 + (Bits(2) And &H30) \ &H10
    Bits(2) = (Bits(2) And &HF) * &H10 + (Bits(3) And &H3C) \ &H4
    Bits(3) = (Bits(3) And &H3) * &H40 + Bits(4)
    
    ' add the three new characters to the output string
    For iCtr = 1 To iLen - 1
        strDecode = strDecode & Chr$(Bits(iCtr))
    NextNextDecodeBase64String = strDecodeEnd Function

解决方案 »

  1.   

    帮你顶顶
    我有发送的控件,没有接受的控件,如果要
    邮箱联系:[email protected]
      

  2.   

    谢谢你老头兄!我都顶了好久了,不是没人解决,是能解决的人还没看到,还有碰巧还有代码的朋友估计也不多,谁能提供资料的地址也可以,但我需要的是winsock读取邮件base64解码和提取附件的代码
    等我搞到手后,一定放到网上,别让更多的人着急
      

  3.   

    收取的邮件有文本格式和html格式,是否要自己来判断格式后采取相应措施呢?老问题,谁有代码
      

  4.   

    哦?!对了, online(龙卷风V3.0--笑傲江湖)好像原来不叫这个名吧?原来好像是V2.0--再出江湖
    是也不是??
      

  5.   

    请问各位:
    1、怎样用Winsock通过一个有登陆认证的SMTP发送邮件,具体过程是什么?
    2、据我了解登陆名和密码需要MDx之类的加密,用VB怎样实现?
    3、另外想了解SMTP服务器的全部返回码,望大侠们不吝赐教!
      

  6.   

    您可以看看HTTP://www.smartsoftcn.com上,以前我写的一个软件,好久没更新了.
    QQ号:88974534
      

  7.   

    您可以看看HTTP://www.smartsoftcn.com上,以前我写的一个软件,好久没更新了.
    QQ号:88974534
      

  8.   

    xiaohuangtao(绿毛网虫) 
    这个原程序我前两天找到过,有16个ocx控件找不到。没法运行,只能打开部分代码看