ASP, CDO For Windows 2000 & Embedded / In-line Images Showing As Attachments
I have been using the CDONTS.Newmail object for a number of years to send
nicely formatted HTML Emails with inline images.
I am now trying to switch over to using CDO and I cannot reproduce this
functionality. I am using the AddAttachment method instead of the old
AttachURL method but the attached images just show as separately attached
files rather than in line in the HTML.
According to MSDN:
"If you populate the HTMLBody property before calling the AddAttachment
method, any inline images are displayed as part of the message."
Well, I am doing that but it is not working. The images show up as if I had
attached them using the old AttachFile method.
Code follows....
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Exporting To Word Using ASP - Need Linked Images To Be Embedded
I have an application in ASP that exports to Word using the Response.ContentType method. The application references another ASP page through the img tag that uses a Response.BinaryWrite (of an img content type) for its output. In other words: App A.ASP contains the code: [...] <%Response.ContentType = "application/vnd-msword"%> [...] <img src="B.ASP"> Then B.ASP contains the code: [...] <%Response.ContentType = "image/png"%> [...] <%Response.BinaryWrite BinaryObject%> [...] When Word opens and the document is saved, it references the images as links. I need to have these images be embedded as the file will need to be emailed outside of the network. I can go in and manually break the links and save them as embedded files, but this process needs to be automated as users will not know how to do this. Is there a way to force these images to be embedded instead of referenced as links when the Word doc is intially created?
Images Not Showing Up
why some of my graphics wouldn't be showing up? I'm using css and everything looks fine in dreamweaver until I upload it then half my graphics are not visible on the page but they are there because I can still click on them, I just cant see them. Any reasons?
ASP.NET On Windows 2000
Our current websites are hosted on Win2K Servers using classic ASP and IIS 5.0. We will be acquiring a 3rd party website that is written in ASP.NET. Hate to sound stupid, but is it possible to run ASP.NET on Win2K or does it need to be run under Win2003?
PWS On Windows 2000
Overnight my work PC has been upgraded - I'm re-installing all my software, and PWS does not work It may be that it's a permissions thing (I need to get this sorted, as it is stopping me from installing a few things) However, I also suspect that PWS for NT is no longer any good for W2K Is there a new version for W2K?
Logging Off Windows 2000 From IIS
I will be traveling and I will need to show someone a secure folder in an IIS website and I will be on a public computer. When we are done, I will need to be able to log off so no one else using that computer will find their way into that part of the website. The security is Windows authentitication using Clear Text. Can ASP log me off. If so I will need to code this before I leave. Can anyone point me to where I can get some examples of code to do this ?
IIS Windows 2000 Not Loading
I've searched several articles about this and cannot get any suggestions to work. My IIS on Windows 2000 Server won't run ASP pages like default.asp. I've tried reinstalling IIS, syncing the passwords for IUSR....etc.
Images Not Showing When Include Navbar
I have an application that has many different look and feels(?) based on the client. Currently my site uses frames with top_navbar appearing in the top (which appears based on the stylesheet of the client) The main frame houses the welcome page which is stored in a directory relating to that client) or other pages stored in a generic directory (VC) which holds all pages that are common to all clients. In this directory is an IMAGES directory which strangely holds all client's images together....there are some common ones...thats prob why its done like that. In order to improve the accessibility of the site, I decided to do an include of the top_navbar, to get rid of frames. This works fine when included in the welcome page as the file paths to the images is correct, but when i do it to from a page that is held in the generic directory (VC) the image path is obviously not now correct. My question is this...How can i get top_navbar to check where it is before setting the filepath to the images? Is this possible?
Windows Server 2000 Question...
Will CDO work under Windows Server 2000? I'm guessing it will. The problem is that I wrote a nice little ASP app under Windows Server 2003 which works REALLY well. Sends out the email with NO problem. 'Course, it uses an external SMTP server, but I'm assuming this shouldn't matter, right?. Because when I port it over to Windows Server 2000, it blows right past it. Is there a particular setup procedure that needs to be done for Windows Server 2000 to enable CDO to work properly?
Windows 2000 SP 4; Browser Hangs
I installed SP4 for Windows 2000. Prior to the upgrade my system was at SP3 and I was able to run ASP scripts from my browser just fine. For exmaple: Code:
Mac To Windows 2000 File Uploads
I've recently installed an asp component called smartupload, it works very well. The problems start when a mac user uploads a jpg or gif, windows will not open the file.it works fine with a windows user.
Connecting To SQL 2000 Database In Windows 2003 X64
I'm trying to connect to a SQL 2000 database on my Windows 2003 x64 Enterprise edition server, and so far I've got the error: Microsoft OLE DB Provider for ODBC Drivers error '80004005' [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified My ASP code is straight forward: Code:
Setting Up MSDE 2000 Release A On Windows XP Professional
I recently downloaded and installed (hopefully correctly) MSDE 2000 Release A. I previously, and still do, have the version of IIS that comes with XP Professional installed on my computer. I wanted MSDE 2000 Release A so that I could do database access using ASP from my websites, which are on my computer. When I went to my first test website, I recieved the following error: Error Type: Microsoft OLE DB Provider for ODBC Drivers (0x80004005) [Microsoft][ODBC SQL Server Driver]Neither DSN nor SERVER keyword supplied /testDB.asp, line 26 The ASP code that I used on my web to connect to the database (which is currently just an empty text file) is the following: Code:
Formmail Email Page Won't Work After Windows 2000 Update
I'm using formmail.asp which is an emailing utility. Basically, the user fills out a request page, clicks "Submit" and the page posts to formmail.asp which emails the user information. I'm running IIS5 on a Win2k server box and recently ran the Windows Updates (the last time I do that). Anyway, that emailing form doesn't work now on any of the sites I host. Any ideas?
JScript: Can't Programmatically Delete Cookies On Windows 2000 Professional
I persist the login info using cookies so that a user doesn't have to login every time they come to our website, unless they previously logged out. Everything works OK on W98 SE, and Windows XP Pro machines. On a W2K machine, IE6.0.2800.1106 SP1, the following function won't delete cookies, or deletes them but they're mysterioulsy re-created when the web page is subsequently referenced. Therefore, a web user can't logout. // ============================================ // remove login cookies // ============================================ function KillLoginCookies ( ) { Response.Cookies ( sCookieCustomerID ) = ''; Response.Cookies ( sCookieCustomerID ).Expires = '01/01/1980'; Response.Cookies ( sCookiePassword ) = ''; Response.Cookies ( sCookiePassword ).Expires = '01/01/1980'; } What am I missing here?
Access 2000 Or SQL Server 2000
I am planning to design a database (destined for the web) that will have between 20000 and 45000 records in it and will receive a lot of reads but very very few writes (just from me). Now the question is should I use: 1) The combination of Access 2000 (accessible through ASP or ASP.NET) using OLEDB Jet or 2) SQL Server 2000 ? Of course I know that the SQL Server option is a better one, especially since it's said that an Access DB can have about 9 users or so accessing it at the same time. But is that a general rule or is it about many people writing to the DB? In other words, if an Access DB has hardly any writes and 99.9% reads can it be used as efficiently as it would be used on SQL Server 2000?
Name Of Arabic Font Which Can Be Embedded
my problem is that i want to convert my web pages into Arabic. and for this I have already install Arabic font in my pc but the problem is that once i select that specific Arabic font the text is still written in English . Can u please suggest me some embedded Arabic fonts which are when selected will write Arabic rather than English.
Cdonts Embedded Image
My readers that are lotus note user receive the mails I send using cdonts with image displayed as attachement in place of inline. I read http://www-1.ibm.com/support/docvie...uid=swg27002572 that say "for displaying image inline in lotus you must set correct mime header as content disposition : inline" however I can't achieve it with cdonts : my mime header is stuck to "content disposition : attachemnt" and I can't see how to change it. I read somewhere that using attachurl instead of attachfile will fix it but my test did not achieve this way.Any of you experienced sending inline image to lotus note users with cdonts ?
Embedded Code Within JavaScript
I have a checkbox in a form and i want it to create a session if clicked. If it is not checked the session is deleted. I have tried the code below but it always creates the session even if the check box isnt clicked. <input type="checkbox" id="txtValidate" onClick="<%session("checked")= "true"%>" />
Error In COM+ While Migrating From 2000 Server To 2000 Advace Server
I have one 3 tier architecture application running on Windows 2000 Server. I have created replica of same machine on another machine where OS is Windows 2000 Advance Server. But when I port same running application on new machine i.e. Machine with OS as Windows 2000 Advance Server, my middle tier (Active-X Dll, COM+ application) fails. It throws common error Invalid Procedure Call or argument What could be the problem? Do I need to change any settings for running application on Windows 2000 advance Server.
Read Cell Data Line By Line From Excel
I had created a macro to read data from an excel sheet and write the values to a text file. I had used "ActiveSheet.Range("GB" & k).Value" command to read the values from the excel.some cells in the excel sheet is having two lines value and four lines data, the text file is generating that value in a single line. (Ex. the cell value in address column is in four lines and should display in four lines in the text file generated from the macro) Can i do something in the excel sheet or in vb script to read the address value line by line and write line by line in text file?
Logon Field Embedded In Web Page
I have a logon field including user name and password, which is stored to an access DB. Many websites have a logon and password field integrated into the page. I want the field to always be there. When successfully logged on, the user will have access to other pages that I designate. I have a complete web page and I want to stick the code from the working logon field, etc in the page w/o redesigning it around the existing logon.asp page. I am asking if this is something I can do with the skills that I currently possess? Remember, I'm a novice .asp programmer, but an experienced web designed. We're working on the "dynamic" in web page design.
JavaScript Where It Runs When Embedded In Asp Page
I want to know when we embed javascript or vbscript in asp pages where the script runs whether on client's browser or web server? also is there any possibilities like in asp.net we have "runat" wherein we can specify sever or client option available when we are programing in asp.
Embedded Flash Movie Controls
I have embedded a flash movie (.swf) in my web page - but I don't know how to put the "play,pause,stop,volume" controls to the video.I need the movie to share with my colleagues at work using our local web server.
Send Html With Embedded Image Email In Asp
I want to send email in html format with containing more images added dynamically using cdo.message method. can you pls explain any body one how to do this. i alredy done this, but it send only one picture with that email. here i posted my code also. pls any one tell me what is the problem in this code. theSchema="http://schemas.microsoft.com/cdo/configuration/" Set cdoConfig = server.CreateObject("CDO.Configuration") cdoConfig.Fields.Item(theSchema & "sendusing")= 2 cdoConfig.Fields.Item(theSchema & "smtpserver")= "smtp server" cdoConfig.Fields.Update Set mail = Server.CreateObject("CDO.Message") html = "<html>" html = html & "<head>" html = html & "<meta http-equiv=""Content-Type""" html = html & "content=""text/html; charset=iso-8859-1"">" html = html & "</head>" html = html & "<body>" html = html & "<p><font face=""Arial"" ><b>Name: " & name & "</b></font></p>" html = html & "<p><font face=""Arial""><b>Company Name: " & cname & "</b></font></p>" html = html & "<p><font face=""Arial""><b>Country: " & ctry & "</b></font></p>" html = html & "<p><font face=""Arial""><b>E-mail: " & email & "</b></font></p>" html = html & "<p><font face=""Arial""><b>Details: " & remarks & "</b></font></p>" html = html & "<p> </p>" for i = 0 to ubound(iid) html = html & "<img border=""0"" src=""" & "http://www.abcd.com/img/" & fnme(i) & """></td>" next html = html & "</body>" html = html & "</html>" mail.From= emailFrom mail.Configuration=cdoConfig mail.To = emailTo mail.Subject = emailSubject mail.HTMLBody = html mail.Send set mail = nothing set cdoConfig = nothing
Searching Access Databases And Their Embedded Documents.
I've had a look and found a few items on searching a database but I need something a bit more complicated. I want to store documents in a database, I also want to have a web page view and pdf download of the documents available (easy enough if I just embed the URL of the locations). The problem is I want to also be able to provide a search page that allows the user to search the documents and the database (for authors, date etc) using the same page. So the question is what's the best way to start with the database and pdf docs and end up with a web view and search engine for it. The database is Access btw.
Read Txt File Line By Line
I have an encrypted .txt file created by asp. Its formatted with lines etc. Title followed by description underneath. I need to read this into ASP now, and parse it line by line. On each line read, run the function to unencrpt and add line to a new file. Its the line by line Im having trouble with. If i do the full textstream no formatting takes place coz im adding the fulltextstream all in one addline call. How can I loop through lines ?
Attachments In ASP
I am using an upload page that I found from another site to upload a scanned copy of a document. What I want is to be able to associate each document to a field in the database.For example - I create a new record in the DB. The last field will allow me to upload an attachment to the server. Once that file is uploaded - it will associate that file to the database record so that when I use my view page, I can click the attachment and open it.Can anybody assist me on this? I am just not sure how to reference the attachment in the database or how to automate it to maybe an autoincrement field that will change the file name as well.
Attachments
is it really difficult to create a code that allows people who visit a certain paige to add an attachment to it?
Form Attachments
I need some guidance in regards to asp forms w/attachments. Im trying to make a form where you can upload a CV and this CV as well with the form gets sent to an Admin. I'm using CDOSYS, and the code from microsoft etc is working to a point, the form is sending fine, but email attachment is giving me some random file name with a (.dat) extension.
Can't Attach Attachments In Email Using ASP CDO
I try to grab the checked files from HTML page and then send those PDF files as attachments. It can just send email, there are no PDF files attached. Can anybody point out my error? My idea is: When people check the check boxes in HTML page for the PDF files, it will transfer the files' name to ASP page. Then, it will attach it in the email. Code:
SOAP With File Attachments
I have been using the MS SOAP 3.0 toolkit with DIME for pulling data and files from our content server. Now I want to push files into it using SOAP with DIME attachments. I am able to upload a file to the server and pass the file/path reference into the MSSOAP.FileAttachment30 object using this code:
Read XML E-mail Attachments
I was wondering if somebody could point me in the right direction on this subject. Basically, I have a mailbox which recieves emails with an XML attachment. What I would like to do is read the XML attachment on each new email received and then insert it into an SQL database. As it stands I am unsure of which path to take and my initial google searches have come up with nothing so far. Does anyone have any ideas as to how to approach this problem?
Emailing Attachments With CDONTS
i'm still kind of new to ASP all together but i need to make a web form which will email the information to a specified email address. i've gotten the form to work flawlessly. however, i would like to add an attachment field so the user can upload attachments for us. how do you code attachments? our server is currently using CDONTS.
Adding Attachments With JMail
I’m creating an application that uses JMail to send email. And it works great!! as longs as I don’t try to add an attachment. However, I really need to have my users be able to add attachments; otherwise the purpose of this application is null and void. I know that the file that is attached needs to be uploaded to a file share folder via FTP then encoded before being sent. My problem is that I don’t know how to code it. This is the JMail code that I am working with: I need some help in getting the code other than (Jmail.addAttachment) for adding the attachment......
Cdo Email Attachments From Client
Right what I am after is a neat bit of code that wraps up sending a cdo email with an attachment from the clients machine and not the server, so need a built in browser and file upload send and delete facility in the creating and send email code?
Sending PDF Attachments With JMail?
for some reason i cannot send PDF's as an attachment, every other file type i try sends fine, but not pdf's.. could anyone please tell me why this is, and if there is a work around for it? I'm running JMail 4.7
CDOSYS-Multiple Attachments
I am having trouble sending multiple attachments as selected from a select list with multiple="multiple". It will send one just fine and the array is including the correct absolute path but I get a "syntax error" message whenever I try to do this. Here is my code: If IsArray(AttachArr) Then For j = 0 to UBound(AttachArr) .AddAttachment AttachArr(j) Next End If I am guessing it has something to do with repeating the ".AddAttachment" line. I would appreciate any help I can get!
Routing Email With Attachments
I have a web form that has a textarea, a input type="file" and a submit Upon submission, it is calling an asp script. I need my asp to send an email (this is a constant, this email will remain the same). The email's body will contain the content of the textarea, and the file that was uploaded by the input file should be attached to the email. Now, does anyone know how to achieve this? I am using CDO in my asp and I can retreive the textarea contentg, but i can never send the file attachment.
CDO/CDONTS And Truncated Attachments
On our previous production server, we used CDONTS to attach jpeg image to the mail. On our new server (both are Win2000) attachments are truncated to ~108B (that's what outlook shows), or 0 bytes when I try to save to disk from Outlook. I'm sure that files to be attached are accesible, because security is set to allow for Everyone. I suspect something with SMTP config, but what? Because I couldn't find what's wrong I moved to CDO, but the result is still the same in the end. Any ideas?
Attachments From Mailing List
We have stored user registration information in an Access database, and we wish to develop an email with attachments like words document and pictures in jpeg/gif format and import the email address from the mailing list in the Access database and to send this to the user.
ASP Form Mail With Mulitple Attachments
I have found a FormMail type script in ASP that will send 1 attachment but getting any more seems to be a problem.. Can anyone suggest a script paid or free download? Also the webserver and exchange servers sit on different boxes will this cause any problems?
Sending Multiple Attachments Via Email
Just want to confirm if you can add multiple attachments like this? Code: Mail.Host="test@yahoo.com Mail.FromName="test@yahoo.co.uk" Mail.AddAttachment "C: est.doc" Mail.AddAttachment "C: est2.doc"
Cdo Multiple Attachments From Local Machine
I have a cdo script to send an email from a web page hosted externally to my company. I want users to be able to attach multiple documents from their local machines. How do I do this - do I need to upload them to the server first or does cdo do this automatically? I tryed this: MyMail.AddAttachment "F:/images/test.gif" but get the error: 'The system cannot find the path specified.'
How To Send Multiple Attachments To Email, From This Script I'm Using Now...
Here's the script I'm using now to send me a picture selected in a form (from a browse button type thing), sent to me in the attachments. Right now it will only send the one picture (field name="Attachment"), how can I change this script to send multiple (for example; ten) pictures in the attachments from the form?? Here's the script...
Cannot Get ObjMail.AttachFile To Work For Emailing Attachments
I have been reading quite a bit on how to do the objMail.AttachFile object, and no one can seem to get to it work properly. I have seen many variations such as: objMail.AttachFile = (C:MyPathMyFile) objMail.AttachFile = ("C:MyPathMyFile") objMail.AttachFile = "C:MyPathMyFile" objMail.AttachFile(C:MyPathMyFile) objMail.AttachFile( Server.MapPath(<directory>) & arrFileList(intIndex) I havent seen anyone report that they got it to work. I am using enctype="multipart/form-data" on my original web form, specifying the input type="file", declaring the attached file variable on my asp page, and doing request.form to gather the appropriate value, but nothing works. Other forum users have said that it does not like virtual paths, but rather hard-coded paths, for some reason. Does anyone have some good code that works?
|