I have a form that triggers the sending of an e-mail via CDOSYS. I'd
like to make this a nice HTML-formatted multipart message, but for some
reason the text version is coming through blank.
Originally I thought I had read that CDO has an automatic text converter
that will turn the HTML code into a plain TEXT message, but when that
didn't work (and I couldn't find anything further about it), I added a
custom text line like this:
objMessage.TextBody = "This is the text body."
objMessage.HTMLBody = "This is where I put the long HTML code."
objMessage.send
That worked in my mail client (Thunderbird), but the messages still go
blank in my wife's Hotmail account (actually, if I send it directly to
her hotmail account they don't arrive at all; if I send it to her other
address that forwards to her hotmail account, they come in, but the body
is blank).
can anyone post or direct me to a code snippet for sending a plaintext/html mutlipart email using CDOSYS? I can do basic code, but this is way beyond me. If a user enters html into a form, is there a way for code to strip that out and leave only plaintext behind?
The idea is that a user would fill in one html field, the form would email it in multipart, with one part using the html the user entered and the plaintext part using the same info but with the html code stripped out.
I am trying to send out an email newsletter using both HTML and plain text? Any good resources for doing this? I can't seem to get it to display the TextBody when Outlook is set to display emails using Plain Text.
I am using:
Dim objMail Set objMail = Server.CreateObject("CDO.Message") objMail.To = varEmail objMail.From = "webmaster@imysite.com ( Webmaster)" objMail.Subject = "My Subject" objMail.BodyPart.ContentMediaType = "multipart/alternative" objMail.TextBody = "No HTML here. I want this text to display if HTML is turned off." objMail.CreateMHTMLBody "http://www.mysite.com/mailer.html" objMail.Send Set objMail = Nothing
When I receive the email in outlook with HTML turned off, it comes up a mess. I was hoping the TextBody would show. Also, the images I am using have full paths (http://www.mysite.com/image.jpg) but they are still showing up as attachments with odd names like ATT21435.jpg.
"Cannot use Request.Form collection after calling BinaryRead"
I get this message cause I have a form that inputs two types of data: a file to upload and a field value to save in a datasource. The encryption is "multipart/form-data". The file is uploaded successfully, but, how can I invoque the fields of the "request.form" without getting this error?
Is it possible if i wanna append xml data and upload picture at a same time using the same form?
The problem i'm facing now is, when i add the 'multipart/form-data', i can't append the xml data
I know there's one solution, using 2 FORM but the project i'm doing now is designed to be put them both (file type for upload and textarea for append) together
Besides, i have no idea how to encode or decode the posted data.
Here's what i'm trying to do, send out an email that contains both text and html with the mime encoding that will let the user's client display what they support. This email will be an external file.
How to send the HTML and Text email at the same time?CDONTS only send one type of email at one time and we should know before hand what type of email the client can receive. In my case i want to send both and depending on clients email reader the right one should show up.
I have used ASP email component also but for this component to work properly we should have relaying enabled on our SMTP server.Due to the threats of SPAM i dont want to do this. I am not any demanding here but simply trying to find the better way
i have created a registration page containing a form than sends username password to an asp processing page. If the user exists it sends the user back to the registration page with server.transfer command otherwise it adds the new user to the database as expected.
Anyhow I now want to add an upload feature to the registration page (using pure-asp). The example I used says that the form Enctype property should be set to mulipart/form-data.
Now when I add a new user via the registration form, the processing page for some reason assumes the user is already registered (BUT IS NOT IN DATABASE) and the server.transfer code is executed ? sending the user back to the registration page.
I have a form which uses the encode type "multipart/form-data". How do you parse and iterate through the form field collection once the binary read method is used?
If I'm using multipart/form-data as the enctype and the action is the same page how do I check if the form has been submitted? Usually I'd use something like this:
Code: if request.form("input_submit") = "Save" then ' Process the form ... end if
I am using VB 6 and ASP to upload files to the web server in one of my web applications. The architecture is something like this...Thin ASP/html front end using multipart/form-data when user selects the file and clicks on upload a COM object is being called to upload file.
This works absolutely fine when dealing with file sizes in b/w 1 to 15mb....Now users are trying to upload huge file sizes such as 80mb/100mb. the web application dies without uploading the file....hence was interested to know if there is any size restriction for this???
The COM object is written using ASP Scripting library, MTS scripting engine, ASPSOFT upload....references.
I am trying to upload a file . In my asp page I have enctype='MULTIPART/FORM-DATA'. for my form. Problem I am having is that I have some hidden variables in the form which do not pass through when that form is submitted. how to pass the values of hidden variables with enctype='MULTIPART/FORM-DATA'.
I have a form (which is multipart/form-data) it has a file field and a select. When i submit this form i can get the file but i can't get the value of the select? any ideas?
I am facing one problem while uploading images in ASP. I am using ASPUpload to upload the file. I can upload the files also. for that I am giving the Encription type as multipart/form-data. THat time I am not able to get the other informations in that form like some hidden fields inthat form.
Is it possible to get the information when we were uploading the images. I am using post method for uploading.
How to send the HTML and Text email at the same time? CDONTS only send one type of email at one time and we should know before hand what type of email the client can receive. In my case i want to send both and depending on clients email reader the right one should show up. I have used ASP email component also but for this component to work properly we should have relaying enabled on our SMTP server. Due to the threats of SPAM i dont want to do this. I am not any demanding here but simply trying to find the better way.
An application is logging faxes sent in SQL2000 image column type. I have found code on the net but what it is doing is prompting to save to local which is fine for single page image. Not good for multiple page faxes. I have not been able to locate an example to load in the browser or how to handle multiple image in the one column. Code:
I'm trying to setup an ASP page to POST an image across to another page- essentially simulating what a browser does when you use <input type=file> in a HTML form.
I'm able to correctly setup the headers etc and do the POST, but I'm unable to include the binary data of the image.
The only way i've been able to do it is if I base64 encode the image. I'm using MSXML2.ServerXMLHTTP to do the POST, and I can't seem to do the .send with a form body that includes the binary data of the image. Code:
I am near to desperation as I have a million things to get a solution for my problem. I have to post a multipart message to a url that consists of a xml file and an binary file (pdf). Seperately the posting words fine but when I want to create one multipart message with both then things go wrong.
The binary file is converted and of datatype byte() The xml file is just a string.
I don't know how to merge these two into the multipart message. I have tried converting the binary to string and then concatenate but that doesn't work as it seems to leave off the last part of the file and the boundary.
I am using an asp page (upload.asp) to gather information and to upload files to the web server using SoftArtisans SAUpload Tool. In the first page (upload.asp), I have a form for gathering info with the following: Code:
I am trying to complete a file upload form and I am getting very close (at least I think I am). Part of my process is that I want to display the file location back to the user after the file is uploaded.
So here is what occurs.
-I have a from that has the encType="multipart/form-data" as part of the form (it is doing a post). -In the next ASP page, I try to view the contents of the INPUT TYPE=File by using Request.Form("txtFileLocation"). The problem is that when I display this value it is blank.
This is part of a file upload process so I think I have to use encType="multipart/form-data", correct? Then assuming I have to use the encryption or assuming it is wise to, how can I retrieve the path the user entered in the previous form in the txtFileLocation?
I tried this without encType="multipart/form-data" and then I was able to display the path entered but the way I understand this is that it is required for the file upload process or at least it adds security.
what exactly does the enctype="multipart/form-data" do? I'm having trouble getting the request.form("UploadFile") to work with it, but it has to be in the form for the file upload to work. Is there a way to "undo" this once it makes it to the action page?
I am desperately trying to install a login script for my website. I keep getting this error:
error '80040211' /register.asp, line 88
Here is what is on line 88:
objCDOSYSMail.Send
i spoke with my hosting company - they said CDOSYSMail.Send and objCDO.Send are the same thing and if one is supported they both are - is this true?
I don't know what to do to get this working. It's a remote SMTP, but they have assured me that isn't an issue because I have the correct outgoing SMTP info in place (Verio hosting)
I know with CDOSYS there's a objMail.from class, but this is for the From email address of the sender, not the From Name. Is it possible to assign a from name and from email address as seperate values?
I have an asp registration form, generating a html email, using cdosys. When a hotmail user registers they receive an empty email or so it seems, until you forward the email then the contents appeas as if by magic. Is this a problm in the way my asp page is generating the email or is it a settings issue with the hotmail account
I have allready posted my problem at this forum and i got replies too.But they suggested me using cdont or cdo component for win 2000.But my os is XP professional and it contain CDOSYS component for sending email in asp.Plz provide me solution a/c to Windows XP Professional CDOSYS component
I keep getting this error when my website tries to create an object to send an email for the checkout email confirmation: Error creating object: 006~ASP 0177~Server.CreateObject Failed~800401f3. Do you have any idea of the reasons this could happen? I had an engineer configure the software for CDOSYS, and this is what he said: Andrew, I’ve replaced all the files and I still get the same error message. So this leads me to believe that we’re looking at the wrong site or where I am publishing to the wrong location. Either that or the host is doing some sort of an ASP caching. I don't see how he could be publishing to the wrong location; i gave him the right ftp info. Do you know what an ASP caching is, or do you have any clue what i could do to try to fix this problem, or where this error came from in the first place? URL URLI was told by somenone that the object is not installed and registered properly. Does this mean that the dll for CDLSYS is not installed server side, or that the error is a function of my server not being set up right?
i am using CDOSYS to send mails to the users from my application. Everything is working fine, mails are being sent to the user but in the mail the user receives, some extra characters such as '!' or spaces are coming between words. I tried defining a character set but still the problem exitss.
Does CDOSYS have all the same methods and properties that CDONTS does? I need to know 'cause I just put XP on my box and I heard CDONTS has been deprecated since Win2k anyway.
I am having difficulty with the cdosys for windows 2000, I can't seem to find a method that allows me to attach a file, I have been searching msdn and the page I needed was not available.