|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Mail attachment from memoryHi all,
Does anyone know how to send mail with attachment from memory, rather than from a file on disk? I am using VB.NET 2003. Thanks in advance Goran Djuranovic What does that mean?
"Goran Djuranovic" <goran.djuranovic@newsgroups.nospam> wrote in message news:e5F9qfoXGHA.4212@TK2MSFTNGP02.phx.gbl... Hi all,Does anyone know how to send mail with attachment from memory, rather than from a file on disk? I am using VB.NET 2003. Hi Homer,
I am trying to attach HTML (or any other) document without having to save it to the disk. It get the "Specified cast is not valid." error on ".Send(MailObj)" line. I guess I could format the Mail object to be HTML, bad I would really like to send HTML doc. Thanks Goran Djuranovic "Homer J Simpson" <nob***@nowhere.com> wrote in message news:7yi%f.72463$%H.64161@clgrps13... What does that mean? "Goran Djuranovic" <goran.djuranovic@newsgroups.nospam> wrote in message news:e5F9qfoXGHA.4212@TK2MSFTNGP02.phx.gbl... Hi all,Does anyone know how to send mail with attachment from memory, rather than from a file on disk? I am using VB.NET 2003.
http://www.example-code.com/vbdotnet/InMemoryAttachments.asp
--
Get a powerful web, database, application, and email hosting with KJM Solutions http://www.kjmsolutions.com "Goran Djuranovic" <goran.djuranovic@newsgroups.nospam> wrote in message Does anyone know how to send mail with attachment from memory, rather than news:e5F9qfoXGHA.4212@TK2MSFTNGP02.phx.gbl... Hi all, from a file on disk? I am using VB.NET 2003. Thanks in advance Goran Djuranovic Hi Goran,
As for .NET 1.1, the system.web.mail component only support file based attachement, if you do need to send attachement from inmemory or other source, we may need to consider using other 3rd party smtp component. For .NET 2.0, the system.net.mail component can help generate attachment from different source(include inmemoryt stream). Regards, Steven Cheng Microsoft Online Community Support ================================================== When responding to posts, please "Reply to Group" via your newsreader so that others may learn and benefit from your issue. ================================================== This posting is provided "AS IS" with no warranties, and confers no rights. Get Secure! www.microsoft.com/security (This posting is provided "AS IS", with no warranties, and confers no rights.) Hi Steve,
Thanks for your response. Too bad .NET v1.1 does not support that. As for the problem specifics, I was trying to attach HTMLDocument without having to save it to the disk, but got the "Specified cast is not valid." error on ".Send(MailObj)" line. Goran Show quoteHide quote "Steven Cheng[MSFT]" <stch***@online.microsoft.com> wrote in message news:jT99j5sXGHA.5540@TK2MSFTNGXA01.phx.gbl... > Hi Goran, > > As for .NET 1.1, the system.web.mail component only support file based > attachement, if you do need to send attachement from inmemory or other > source, we may need to consider using other 3rd party smtp component. For > NET 2.0, the system.net.mail component can help generate attachment from > different source(include inmemoryt stream). > > Regards, > > Steven Cheng > Microsoft Online Community Support > > > ================================================== > > When responding to posts, please "Reply to Group" via your newsreader so > that others may learn and benefit from your issue. > > ================================================== > > > This posting is provided "AS IS" with no warranties, and confers no > rights. > > > > Get Secure! www.microsoft.com/security > (This posting is provided "AS IS", with no warranties, and confers no > rights.) > > > > Thanks for the response Goran,
Yes, it is a bit awkward that the 1.1 System.Web.Mail component doesn't provide such built-in funcitons and that's also why the 2.0 framework include a pure new and powerful System.Net.Mail namespace. So far using 3rd party component will be the available approach. Regards, Steven Cheng Microsoft Online Community Support ================================================== When responding to posts, please "Reply to Group" via your newsreader so that others may learn and benefit from your issue. ================================================== This posting is provided "AS IS" with no warranties, and confers no rights. Get Secure! www.microsoft.com/security (This posting is provided "AS IS", with no warranties, and confers no rights.) Hi vbnetdev,
Thanks for your response. I was just trying to dodge the "3rd party" solution. As for the problem, I was trying to attach HTMLDocument without having to save it to the disk, but got the "Specified cast is not valid." error on ".Send(MailObj)" line. Goran Show quoteHide quote "vbnetdev" <vbnetdev@community.nospam> wrote in message news:%23ln1EJqXGHA.3704@TK2MSFTNGP03.phx.gbl... > http://www.example-code.com/vbdotnet/InMemoryAttachments.asp > > -- > Get a powerful web, database, application, and email hosting with KJM > Solutions > http://www.kjmsolutions.com > > > > "Goran Djuranovic" <goran.djuranovic@newsgroups.nospam> wrote in message > news:e5F9qfoXGHA.4212@TK2MSFTNGP02.phx.gbl... > Hi all, > Does anyone know how to send mail with attachment from memory, rather than > from a file on disk? I am using VB.NET 2003. > > Thanks in advance > Goran Djuranovic > Goran Djuranovic wrote:
> ... I was just trying to dodge the "3rd party" I've used the free http://www.aspemail.com/index.html in ASP; it comes with > solution. a wrapper assembly for use in ASP.NET. Andrew Thanks body. You are a savior. :-)))
- G.D. Show quoteHide quote "Andrew Morton" <a**@in-press.co.uk.invalid> wrote in message news:uXoPBVuYGHA.3424@TK2MSFTNGP02.phx.gbl... > Goran Djuranovic wrote: >> ... I was just trying to dodge the "3rd party" >> solution. > > I've used the free http://www.aspemail.com/index.html in ASP; it comes > with a wrapper assembly for use in ASP.NET. > > Andrew >
Why does Replace return Nothing???
VC6 ATL DLL interop with VB.NET All the king's horses and all the king's men....... How do I determine if a control has a specific property i need timer interval more than 1 Minute. Class Inheritance string value to new form instance? Determine if a File exists Title Bar is visible Call control's event from a collection |
|||||||||||||||||||||||