I am sending an email with an attachment using the following Code
Dim msg As New System.Net.Mail.MailMessage(req.EmailFrom, req.EmailTo)
Dim att As New System.Net.Mail.Attachment("C:\Documents and Settings\michaelr\Desktop\1216259.pdf")
With msg
.Attachments.Add(att)
.Body = req.EmailBody
.Subject = req.EmailSubject
End With
Dim client As New System.Net.Mail.SmtpClient()
client.Host = PDFService(Of T).mSMTPServer
client.Send(msg)
The file size of the attachment is 396KB, upon the recipient receiving the email outlook shows the file size as 543Kb. Strange thing is if I send an email with the same attachment using outlook the file size is 396Kb.
I understand that file sizes can increase due to the attachment being base 64 encoded as opposed to just raw binary.
What I am failing to see is why outlook send a file which is 396KB in size but in code when sending it, the same file is 543Kb.
Any help would be appreciated and get a big green tick.