473,396 Members | 1,683 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Data stream as attached in Classic ASP using CDO

Does anyone know how to attached a data stream to CDO Message email sending object in Classic ASP using Javascript?

Pls. let me know if u know!

I have following code which is not working.

var myMail = Server.CreateObject("CDO.Message");
var cdoContentDispostion = "urn:schemas:mailheader:content-disposition";
var cdoBase64 = "base64";
var sContent="test datas";

myMail.Subject="Downloads";
myMail.From="balaji.sivan@parker.com";
myMail.To="balaji.sivan@parker.com";
myMail.TextBody="This is a message.";
//myMail.AddAttachment
var oPart = myMail.Attachments.Add();
oPart.ContentMediaType = "application/octet-stream";
oPart.ContentTransferEncoding = cdoBase64;
oPart.Fields(cdoContentDisposition).Value = "attachment;filename=""Test.txt""";
oPart.Fields.Update();

var oStreamOut = oPart.GetDecodedContentStream();
//oStreamOut.Write(BinaryData);
oStreamOut.WriteText(sContent);
oStreamOut.Flush();

myMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing")=2;
myMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver")="smtp1.us.parker.corp";
myMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport")=25;
myMail.Configuration.Fields.Update();
myMail.Send();
Nov 15 '11 #1
0 1534

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: gurumare | last post by:
Howdy, I am just learning c++ and of course i am doing the classic "gradeBook" program, but i am trying to figure out a way to save my data so that the next time my prog is opened it will still be...
4
by: Lorn | last post by:
i have a very large data stream, on the order of 1.5 million records an hour (32 bytes per/record), which i would like to try and record to disk. it doesn't need to be iserted into a db, so flat...
3
by: Sarah | last post by:
I would like my vb.net software running on an independent system be able to read the data going from a proprietary system to a dot-matrix printer. Few questions - are there any commercially...
2
by: ads | last post by:
hi i was given a task to display sql server data in ms word using xml. Im currently doing research to accomplish the task. What i have in mind is to create an xml template (or schema?) to load...
2
by: Cuong.Tong | last post by:
Greeting, Can anyone give me some hints about parsing the mulitpart/form-data stream? I have a form looks something like this <form action="process.dll> <input type=file...
6
by: brendan_gallagher_2001 | last post by:
Hi, Does anyone know how to create an attachment using a stream in classic ASP. I can see that it can be done in ASP.Net as per the article below: Initializes a new instance of the Attachment...
4
by: Doug Gray | last post by:
Folks, I am looking for a fast but most importantly a bullet proof method to pass and NMEA data stream (GPS output) ascii numeric strings. The best I can offer is: def fint(a): try: return...
0
by: sandeepk84 | last post by:
Hi all... I am facing a problem in getting attachments from Yahoo Classic using JavaMail. My program reads the attachments from gmail and Yahoo Beta. But attachments of type pdf or txt from...
0
by: AboShorouq | last post by:
Hi, i'am new to this group, so i don't know how the things going on here. i have a serious problem and any help from you guys is very appreciated. i am trying to read data from db2 v8 on AIX...
0
by: akshalika | last post by:
I am new to Biztalk. In my project we need to connect oracle database and insert data into oracle table using BizTalk project. I use WCF Adapter pack(SP2). I create biztalk project then using Consume...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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,...
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,...

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.