Manipulating Attachments
I've read about how to use CDO/CDONTs to manipulate mail sent to a server computer, and how to configure DNS so that the SMTP server will get the mail that you want it to.
Using CDO/CDONTS, can you programmatically access attachments to the mails that are sent to and stored on the server? What is the syntax? Is there an object reference or somesuch that I can look at that will point the way to the answer?
View Replies
ADVERTISEMENT
I have a problem with a customer's XML being submitting to me in a non-well-format XML.
They said that there are 18 other partners who has been able to tweak the XML to make it work. So I guess here is my question, in ASP, when working with XML, how do you handle non-well-formed XML documents on the "listener" response side?
Here's the scenerio:
Customer post XML Data to us (non-well-formed XML)
ie: <sites>
<mytag1>http://sonny.com/</mytag1>
<mytag2><![CDATA[http://google.com?search=hellow+world&language=EN]]></mytag2>
<mytag3>http://mysite.com/helloworld/?myvar1=123&myvar2=abc</mytag3>
</sites>
Looking at the XML data above the mytag1 and mytag2 are fully W3C XML conformed XML syntax, however the mytag3 is NOT. there are 2 tags in XML that are considered illegal characters in XML data, the "&" and the "<". In our case it's the "&" that's giving us grief.
Ok continue on, the customer sends this messed up format to me and I open it up with the MSXML DOM object and it craps out. Because it can't load the REQUEST XML.
Anyone know how to PULL the REQUEST value to a STRING variable? here are some sample codes I've tried.
sample 1.
Set X = server.createobject("Microsoft.XMLDOM")
X.async = False
X.Load(REQUEST)
strXML = X.xml
Response.ContentType="text/xml"
Response.Write strXML
Sample 2.
strXML = cstr(REQUEST)
Response.ContentType="text/xml"
Response.Write strXML
Both doesn't work with the non-well-formed XML sent, Sample 2 doesn't work regardless, however Sample 1 does work with a well structured XML document. Anyone know how I can pull the XML from the REQUEST so that I can manipulate the string and format it so that it is parsable by the XMLDOM?
View Replies
View Related
How do I take a string value and trim off the last character?
View Replies
View Related
Select Case request.form("posted")
case 1
case 2
case 3
case else
end select
Here is my case statment each case has a form, which holds a varible named posted. There is a problem however, once the refresh button is pressed it &*#$# up. I need to set request.form("posted") to nothing and it would be good to know how to set all of request.form.
View Replies
View Related
I am wanting to add three fields that adds the totals from a column. Here is my current code that writes out my data from my table: Code:
View Replies
View Related
I have a HTML page with a form on it. I have an ASP page that processes what a user has entered into the form (updates a database etc).
I now need a page that fits between these two pages to pre-process�the users input. I need to do it this way because I am not allowed to change either of the two existing pages.
I know how to read what the user has input into the form and I know how to pass control onto the next page.
What I have not been able to work out is how to change the user input and have those changes passed onto the next page as if nothing has happened (that is, the original ASP page just performs its request.form(�item�) calls as it always has but instead of seeing what the user actually typed in, it should see the changed text as created by the new pre process� page)
I have tried using a regular expression replace but can only successfully make this change a variable and not the original form input. Equally I cannot find a way of swapping the original form input string with the output variable from the replace.
Does anyone have any ideas on this one?
View Replies
View Related
I have a asp page where a checkbox, when clicked will disable all text boxes
associated with the page.
The following is a part of a code for the checkbox with its name and
readonly attributes. name="chk_Complete" <%= isReadOnly %>
I have to disable(or make sure does not disaplay) a save button in the same
page when this checkbox's attribute is readonly. I have no idea how to do
this.
View Replies
View Related
I am trying to use the following code to make the save button invisible in
the asp form when the checkbox is either on or the session variable has a
particular value.
THE CODE IS AS FOLLOWS:
<%If ( cbool(l_IsChecked) = "FALSE" ) or (session("sess_FiscalFirst") <>
"Y") then%>
<input type="submit" value="Save" name="btn_Save">
<%End If%>
In the above, my logic is if the value of the checkbox is not true or the
value of the session variable is not Y then only show the SAVE button.
However this is not happening. I find that when the second part or the first
part is not there, the logic goes fine i.e. the logic holds with only the
first condition or the second condition itself but not with the or syntax.
Not sure why.
View Replies
View Related
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.
View Replies
View Related
is it really difficult to create a code that allows people who visit a certain paige to add an attachment to it?
View Replies
View Related
a FREE mail script which allows multiple attachments?
View Replies
View Related
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.
View Replies
View Related
I am using cdonts to send mail messages with an attachment. The problem I am having is the messages are going through OK but the attachments are not there. Any ideas? I have tried my code elsewhere and it looks.
View Replies
View Related
I'm using this code to send a e-mail with attachment:
Dim oCdoMail
Set oCdoMail = Server.CreateObject("CDO.Message")
oCdoMail.From = strFromEmail
oCdoMail.To = strToEmail
oCdoMail.Subject = "Job Information"
oCdoMail.TextBody = "This is the email notification"
oCdoMail.AddAttachment strFileName
oCdoMail.Configuration.Fields.Item=2
oCdoMail.Configuration.Fields.Item=<My mail server IP>
oCdoMail.Send
This code scuccessfully send mail with attchment on my local. But when we uplaod this code to the web server this is forceing error. If i mark comment the folowing code
"oCdoMail.AddAttachment strFileName" this will work fine on the server, but i need to send e-mail with attachments. how it could be possible ?
View Replies
View Related
Is it possible using mailto: to create an email with everything except an attachment
and then when a user clicks on send intercept that form and recreate the email on the server and add a file to it?
View Replies
View Related
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:
View Replies
View Related
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:
View Replies
View Related
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?
View Replies
View Related
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.
View Replies
View Related
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......
View Replies
View Related
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?
View Replies
View Related
What is the easiest, quickest and cheapest way to send an email from a form with attachments in ASP?
View Replies
View Related
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
View Replies
View Related
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!
View Replies
View Related
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.
View Replies
View Related
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?
View Replies
View Related
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.
View Replies
View Related
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?
View Replies
View Related
i've finally integrated a way to send multiple attachemts from within an asp page and it works!!!!!
View Replies
View Related
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"
View Replies
View Related
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.'
View Replies
View Related
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...
View Replies
View Related