473,473 Members | 1,425 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Mail attachment from memory

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
Apr 13 '06 #1
9 1570

What does that mean?
"Goran Djuranovic" <go**************@newsgroups.nospam> wrote in message news:e5**************@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.
Apr 13 '06 #2
http://www.example-code.com/vbdotnet...ttachments.asp

--
Get a powerful web, database, application, and email hosting with KJM
Solutions
http://www.kjmsolutions.com

"Goran Djuranovic" <go**************@newsgroups.nospam> wrote in message
news:e5**************@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
Apr 13 '06 #3
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.)


Apr 13 '06 #4
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

"vbnetdev" <vb******@community.nospam> wrote in message
news:%2****************@TK2MSFTNGP03.phx.gbl...
http://www.example-code.com/vbdotnet...ttachments.asp

--
Get a powerful web, database, application, and email hosting with KJM
Solutions
http://www.kjmsolutions.com

"Goran Djuranovic" <go**************@newsgroups.nospam> wrote in message
news:e5**************@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

Apr 13 '06 #5
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

"Steven Cheng[MSFT]" <st*****@online.microsoft.com> wrote in message
news:jT**************@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.)

Apr 13 '06 #6
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" <no****@nowhere.com> wrote in message news:7yi%f.72463$%H.64161@clgrps13...

What does that mean?
"Goran Djuranovic" <go**************@newsgroups.nospam> wrote in message news:e5**************@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.
Apr 13 '06 #7
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.)
Apr 14 '06 #8
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
Apr 18 '06 #9
Thanks body. You are a savior. :-)))

- G.D.

"Andrew Morton" <ak*@in-press.co.uk.invalid> wrote in message
news:uX**************@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

Apr 18 '06 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: PeterR | last post by:
I've spent weeks trying to write a function that is simple to use for sending emails with attachments, but I my programming skills are not that advanced. I've noticed a few postings in these...
2
by: knoak | last post by:
Hi there, I've found a script at these great Google fora. a script to send emails with attachments. The script is below this message, name etc. aren't mine, but from the original post. My...
0
by: imre.adam | last post by:
The original message was received at Wed, 2 Mar 2005 20:06:59 +0100 from 87.26.243.56 ----- The following addresses had permanent fatal errors ----- <python-list@python.org> ----- Transcript...
1
by: theWizard1 | last post by:
The following sends my email, but the attachment is empty. The attachment should contain the data that is in the string that was created from the xmlReader. I have a stored procedure written...
0
by: bambi | last post by:
I am facing issues while adding attachments in an E-mail via Mapisend. The code I use is below. If I try to send , I am getting error messgae in Mailmessage.12. Mailmessage.12 is expected as numeric,...
1
by: William Connery | last post by:
Hi, I have a small python program with e-mail capabilities that I have pieced together from code snippets found on the internet. The program uses the smtplib module to successfully send an...
2
by: eng.sharif | last post by:
hi group how i can send mail and attachement in php with "mail function " $s = mail($to,$subject,$cont, $headers); can anyone help
2
by: Ruud | last post by:
Just before leaving for a holiday my collegue modified this script. Now it won't send any body text (The data filled in on the form) and in an error condition it won't send any attachments either....
1
by: maxxxxel | last post by:
Hi Can anyone help me with some asp code , I changed the code to use CDO.message instead of the old cdont.sys to send mail from a ASP webpage which works fine. Our problem is that when we send...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.