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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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 ?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
I can't seem to reproduce this bug. Are you using Exchange? If not what email server are you using?
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.
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 ?
This should be fixed in the 1.10.0 version.... Is this the one you're using?
Thanks!
I was using the 1.9.7
I jus downloaded the latest version and it works fine!