MIME header help.

Started by
-1 comments, last by ELS1 22 years, 8 months ago
I am working on a POP Mail Suite...i have everything working EXCEPT 1 thing. I am able to send files with MIME headers/encoding, but hte problem is that i cannot send text to make it show in the body portion of the email. it works fine when i dont attatch a file. here is some portion of my code

Socket.SendData "FROM: " & TrimALL(txtFake.Text) & Chr$(13) & Chr$(10)
    Socket.SendData "TO: " & TrimALL(AddressBook.Text) & Chr$(13) & Chr$(10)
    Socket.SendData "SUBJECT: " & txtSubject.Text & Chr$(13) & Chr$(10)
    Socket.SendData "Mime-Version: 1.0" & Chr$(13) & Chr$(10)
    Socket.SendData "Content-Type: multipart/mixed; boundary=" & Chr(34) & "NextMimePart" & Chr(34) & vbNewLine
    Socket.SendData "This is a multi-part message In MIME format." & vbNewLine
    
    Socket.SendData "--NextMimePart" & Chr(34) & vbNewLine
    
    ''Socket.SendData txtBody.Text & vbNewLine
    
    ''Socket.SendData "--NextMimePart" & Chr$(13) & Chr$(10)
    

    
    Call SendMimeAttachment(lblFilename.Caption)
    Status.Caption = "Uploading File . . ."
    Temp = vbCrLf + "--NextMimePart" + vbNewLine
    Temp = Temp + "Content-Type: text/plain; charset=us-ascii" + Chr(34) + vbNewLine
    Socket.SendData txtBody.Text & vbNewLine
 
here is the Send Attatchment header code

  Temp = vbCrLf + "--NextMimePart" + vbNewLine
  Temp = Temp + "Content-Type: application/octet-stream; name=" + Chr(34) + lblFilename.Caption + Chr(34) + vbNewLine
  Temp = Temp + "Content-Transfer-Encoding: base64" + vbNewLine
  Temp = Temp + "Content-Disposition: attachment; filename=" + Chr(34) + lblFilename.Caption + Chr(34) + vbNewLine
  Socket.SendData Temp & vbCrLf
 
what am i doing wrong?????? how can i make it send text along with the file? thanks a lot

This topic is closed to new replies.

Advertisement