moin 0

moin 0

  • NA
  • 1
  • 0

smtp mail attachment

Jun 7 2004 10:59 AM
Hi all, I was wondering if there is a way to attach a set of file bytes to my mail as attachment without creating a temporary file on the server. I have a situation where I would be sending mails to a large number of people and I dont want to create a file on the server each time I send out a mail even though I can delete those files. I was looking into adding the contents of the attachment within the body with some headers/encoding to parallel the smtp structure within the body of the message to differentiate between the body and attachment but with no luck. I am trying to use the MailMessage object of .net and whatever i do to the body i m not able to add the attachment. I know i can use the attachment property of the MailMessage object, but just that it doesn't accept bytes on the fly without a file! Any leads? thanx in advance.