WEB-



           

"" WEB- - 28


.ShowOpen

If Len(.FileName) > 0 Then

lstAttachments.AddItem .FileName

End If

End With

End Sub

Private Sub cmdClose_Click()

Unload Me

End Sub

Private Sub cmdNew_Click()

txtRecipient = ""

txtSubject = ""

txtMessage = ""

End Sub

Private Sub cmdRemove_Click()

On Error Resume Next

lstAttachments.RemoveItem lstAttachments.ListIndex

End Sub

Private Sub cmdSend_Click()

'

Dim i As Integer

'

'

'

For i = 0 To lstAttachments.ListCount - 1

lstAttachments.ListIndex = i

m_strEncodedFiles = m_strEncodedFiles & _

UUEncodeFile(lstAttachments.Text) & vbCrLf

Next i

'

Winsock1.Connect Trim$(txtHost), 25

m_State = MAIL_CONNECT

'

End Sub

Private Sub Form_Load()

'

' textboxes

'

For Each ctl In Me.Controls

If TypeOf ctl Is TextBox Then

ctl.Text = ""

End If

Next

'

End Sub

Private Sub Form_Unload(Cancel As Integer)

Set m_colAttachments = Nothing

End Sub

Private Sub Winsock1_DataArrival(ByVal bytesTotal As Long)

Dim strServerResponse As String

Dim strResponseCode As String

Dim strDataToSend As String

Winsock1.GetData strServerResponse

Debug.Print strServerResponse

strResponseCode = Left(strServerResponse, 3)

If strResponseCode = "250" Or _

strResponseCode = "220" Or _

strResponseCode = "354" Then

Select Case m_State

Case MAIL_CONNECT

m_State = MAIL_HELO

strDataToSend = Trim$(txtSender)

strDataToSend = Left$(strDataToSend, _

InStr(1, strDataToSend, "@") - 1)

Winsock1.SendData "HELO " & strDataToSend & vbCrLf