Menu

Empty text attachment

Help
Anonymous
2004-01-05
2004-05-11
  • Anonymous

    Anonymous - 2004-01-05

    Hi,

    For all the mail I sent out with the library. I always got a empty text file attahed. How to turn it off?

    this is what the header shown:

    --Part.1877001420.755101601
    Content-Type: text/plain;
    charset="ISO-8859-1"
    Content-Transfer-Encoding: quoted-printable

    --Part.1877001420.755101601

    My code:

    Dim msg as New MailMessage
    msg.AddRecipient(ConfigurationSettings.AppSettings.Get("ToAddress"), AddressType.To)
    msg.Subject = "some subject"
    msg.AddAttachment(attachfilename) 'a csv file attached
    msg.Body = "Daily Mailing CSV file attached"
    msg.From = New EmailAddress(ConfigurationSettings.AppSettings.Get("FromAddress"))

    Dim smh As New Smtp

    smh.Host = ConfigurationSettings.AppSettings.Get("SMTP_Host")
    Try
        smh.SendMail(msg)
    Catch ex As Exception
        Console.Write(ex.Message)
    End Try

    I am using the newest version (1.09.7).

    thanks.

     
    • Ian Stallings

      Ian Stallings - 2004-01-06

      I can't seem to reproduce this bug. Are you using Exchange? If not what email server are you using?

       
    • Mike Bridge

      Mike Bridge - 2004-02-07

      I think the problem might be that there's a duplicated "mixedBoundary" divider in the case where you have a text and HTML version as well as an attachment.  It comes right before the first attachment.

      Since "GetAttachments" always adds a mixedBoundary, I commented out the extra line in "GetMultiMessageBody" to prevent this.  However, I think it might be better to refactor that into another method, like "addMixedPart", which would take care of assigning the MIME boundaries.

       
    • Maheswari

      Maheswari - 2004-05-10

      Hello,
      I also have the same problem . I have ghost attachments with all the mails. I am using the HP exchange server  & trying to attach an xls & pdf.  I am using only the opensmtp.dll in my project. Is there an updated version of the dll that has fixed this bug ?

       
      • Mike Bridge

        Mike Bridge - 2004-05-11

        This should be fixed in the 1.10.0 version.... Is this the one you're using?

         
    • Maheswari

      Maheswari - 2004-05-11

      Thanks!
      I was using the 1.9.7
      I jus downloaded the latest version and it works fine!

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.