Including Form Items In A Message Body CDOSYS
I am having some problems with my code. It works perfectly, the only problem is that when sending the e-mail, it only sends the Message and not all fields. I need for this to send all fields in the form in the e-mail. Sorry for this very easy question but I am pulling my hair out here. It only sends one field, the "Message" field in the e-mail when it sends it. Code:
View Replies
ADVERTISEMENT
cdosys body text is not being sent by email. Please see if you can spot the problem. Everything below emailHeader & emailFooter is not being sent by email.
see code below:
<!--- BEGIN CDOSYS CODE --->
<%
dim strBody
Set MailObj=CreateObject("CDO.Message")
MailObj.Subject="Your Online order from store-website"
MailObj.From= "store@store.com"
MailObj.To= Request.Form.Item("cEmail")
MailObj.Bcc="store@store.com"
MailObj.TextBody = strBody
emailHeader = "DELIVERY INFORMATION"
strBody = strBody & "DELIVERY INFORMATION (If Delivery was selected):" & VbCrLf
strBody = strBody & "Delivery Choice: " & Request.Form("dChoice") & " on " & Request.Form("choiceDate") & VbCrLf
strBody = strBody & "Delivery Name: " & Request.Form("dName") & VbCrLf
strBody = strBody & "Delivery Address: " & Request.Form("dAddress") & VbCrLf
strBody = strBody & "Delivery City: " & Request.Form("dCity") & VbCrLf
strBody = strBody & "Delivery Zipcode: " & Request.Form("dZip") & VbCrLf
strBody = strBody & "Delivery Phone: " & Request.Form("dPhone") & VbCrLf
strBody = strBody & "Delivery Instructions: " & Request.Form("dInstructions") & VbCrLf
strBody = strBody & "-----------------------------------------" & VbCrLf & VbCrLf
emailFooter = "CONTACT/BILLING INFORMATION"
strBody = strBody & "CONTACT/BILLING INFORMATION: " & VbCrLf
strBody = strBody & "Billing Name: " & Request.Form("cName") & VbCrLf
strBody = strBody & "Billing Address: " & Request.Form("cAddress") & VbCrLf
strBody = strBody & "Billing City: " & Request.Form("cCity") & VbCrLf
strBody = strBody & "Billing Zipcode: " & Request.Form("cZip") & VbCrLf
strBody = strBody & "Billing Phone: " & Request.Form("cPhone") & VbCrLf
strBody = strBody & "Billing Email: " & Request.Form("cEmail") & VbCrLf
strBody = strBody & "Amount to be paid with Gift Certificate: " & Request.Form("GiftCamount") & VbCrLf
strBody = strBody & "Gift Certificate Number: " & Request.Form("GiftCnumber") & VbCrLf
strBody = strBody & "Amount to be paid with Credit Card: " & Request.Form("cCardAmount") & VbCrLf
strBody = strBody & "Credit Card Type: " & Request.Form("cCard") & VbCrLf
strBody = strBody & "Credit Card Number: " & Request.Form("cCardNumber") & VbCrLf
strBody = strBody & "Credit Card Expiration: " & Request.Form("cCardExpiration") & VbCrLf
strBody = strBody & "-----------------------------------------" & VbCrLf
wantedCartColArray = Array(0,0,0,1,1,1,1)
wantedCartColNamesArray = Array("LineItemTax","LineItemTaxValue","ProductID","Quantity","Name","Price","Total")
wantedCartColFormatArray = Array(false,false,false,false,false,true,true)
currencyTypeArray = Array("$",0,-1,-2,-2,-2)
%>
<%
' UltraCart II Email Order Version 2.01
MailObj.TextBody = UCII.BuildEmailBody(false,emailHeader,emailFooter, _
wantedCartColArray,_
wantedCartColNamesArray,_
wantedCartColFormatArray,_
"Order ID",true,_
"Order Date",true,_
"Sub Total",true,_
"Tax",true,_
"Discount",false,_
"Shipping",false,_
"Shipping Method",false,_
"Grand Total",true,currencyTypeArray)
MailObj.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
MailObj.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "localhost"
MailObj.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
MailObj.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60
MailObj.Configuration.Fields.Update
MailObj.Send
Set MailObj = nothing
%>
<!--- END CDOSYS CODE --->
View Replies
View Related
I am trying to put a URL into the body of an email message but I can't get it to display as a link. Code:
View Replies
View Related
I have a script sending mail with asp using CDONTS. The script works fine, the only problem I have is specifying a new line in the message body.
I am used to php's imap commands where you can just set the body to be "Hi This is on a new line!" but putting in the text of the CDONTS mail just displays the as part of the text.
View Replies
View Related
I have an ASP page that sits and listens for responses sent to it by a third party. The third party simply sends a plain text delimited response in the body of the http message.
Eg: Account=2,User=92663,Pass=OK,Action=5
What I can't figure out on my listening page, is how to capture the body of the message being posted to it, so that i can then manipulate the delimited string, and split it up into the variables for later use.
How do i get access to the body of the http page? I thought perhaps using WinHTTP, but it looks like it only works when your page goes looking for a web page, and not when a page is being submitted to it, like in this case.
View Replies
View Related
I recently switch from CDONTS to CDOSYS because of the e-mail delivery delay I am encountering. Now, when I send e-mail using CDOSYS it gives me the error message below:
CDO.Message.1 error '8007000e'
Not enough storage is available to complete this operation.
/development/Administrator_email.asp, line 101
There are about 2000 recipients in the e-mail list. I tried just sending to about 20 of them and I did not have any problem. Code:
View Replies
View Related
Is it possible to embed an image, like a company logo in a CDOSYS generated
message?
If yes, I´ll apreciate some code sample. I´ve been able to format messages
in html the way I like, but I can't figure out how to embed an image.
View Replies
View Related
Can someone please tell me how to set the priority of an email message sent from an ASP script using CDOSYS as below -
set oCdoMsg = server.createobject("CDO.Message")
oCdoMsg.from=...
oCdoMsg.to=...
oCdoMsg.subject=...
oCdoMsg.importance=1 ' fails
oCdoMsg.HTMLBody=....
oCdoMsg.send
With CDONTS I successfully used .importance but that fails with CDOSYS. I have searched the MSDN documentation but can't find it. BTW I find the various alternatives confusing - CDO, CDONTS, CDOEX etc.
View Replies
View Related
I'm just looking into modifying a script for an asp page and I've come across this code.
sch = "http://schemas.microsoft.com/cdo/configuration/"
Set cdoConfig = Server.CreateObject("CDO.Configuration")
With cdoConfig.Fields
.Item(sch & "sendusing") = 1
.Item(sch & "smtpserverpickupdirectory") = "c:InetpubmailrootPickup"
.update
End With
Set cdoMessage = Server.CreateObject("CDO.Message")
Could someone please explain to me what the sch reference is for and if I need it.
I'm going to create an E-mail message and use CDOSYS to send it. I think it's necessary to understand what's going on before I continue....
View Replies
View Related
Hey there, I have a few links in my site similar to this one.
<a href="mailto:contactus@timber.com?Subject=Contact%20Us">
When a site visiter clicks on to this link, it starts up your default browser.
Anyone know how to insert a message in the body of the email?
Something like...
View Replies
View Related
Does anyone know of a form to email ASP script that allows the user to
attach an image file from their computer to be sent as an attachment to the
email, along with other data collected from the form?
I've seen this on sites particularly for recruitment allowing resumes to be
attached along with personal info.
View Replies
View Related
I finally figured out how to get my form to its database and have an
email come my way. However I am now trying to set up the body of the
email to include the form details. However the body of the email that
is sent only includes the last line of the "body" tag and has no
details next to it. Code:
View Replies
View Related
i want create a form that include many text boxes and an fiel field for upload a file to server but when i add "enctype="multipart/form-data" in the form tag i cant get the texts . how can i do a form working with file upload and text fields.
View Replies
View Related
I have a client that wants all his products on one screen, where people can enter the quantities of every item they want and only have to hit one "Add to Cart" button.
So I have an array of results for each products ID number, and quantity amount for each product. How do I loop through those results and add multiple rows to the database?
View Replies
View Related
I have a funtion that is supposed to add items in my shopping basket.
It's an array, and each time the user is adding an item, it adds the item to the array with its quantity and size.
I've never used arrays before, read about it, etc...
The only problem is that when it adds the new product, it's not keeping the ones which were there before :-(.
I have used REDIM PRESERVE. So can't find out what is wrong.
Below are the funtions that i use for testing and the coding where I implement them. Code:
View Replies
View Related
Code to email form data via ASP. Forced to use CDOSYS by 2003 server at host. It sends an email fine, but the form data is missing. Where my going wrong? Could it be the html file's form actuating the .asp file? Could it be an enctype issue? Or bad ASP syntax... Code:
View Replies
View Related
Can someone please tell me if its possible to create an instance of CDOSYS (to send an emails) on one host and have the email sent from another host.. or are there obvious gaps in my understanding of what takes place when one tries to send an email using CDOSYS or CDONTS?
View Replies
View Related
I contacted my hosting people and they said they're running Windows 2003, which uses CDOSYS and not CDONT. So, I followed the advice on the sitepoint site for converting to CDOSYS and have concocted the following script: ....
View Replies
View Related
I’m writing about a form which processes another form from the which i send newsletters.
There are two cases, cdo (plan text) and cdohtml and everyone of them should sand mail with attach, it debends by which case has been selected in the generale settings, stored in a msaccess database.
The strange is that the mail in plain text format (case cdo) is sent, with attach too, and NO ERRORS are encountered:
the html mail des not works, even if the process says (no errors) no mails reaches the recipients. Code:
View Replies
View Related
I am new to asp i am facing in sending the contact form sending through email using cdosys the following is the code server space work on Microsoft Windows 2003 w/IIS 6.0.
When i press send button i get a error as The page cannot be displayed and HTTP 500 - Internal server error .....
View Replies
View Related
i recently finished a tutorial on cdonts and finished putting together the page and form etc. now ive been reading and it seems cdonts is being discontinued and cdosys is taking over. does this mean that my cdonts will not work and i have to trnasfer it to cdosys ?
how can i transfer it to cdosys ? or do i have to make a completely new mail script?
Code: ....
View Replies
View Related
I have downloaded the script from brainjar but it needs a bit of tweaking because my smtp host requires authentication, I have added what i feel are the relevant lines of code but these are giving me a runtime error
These are the relevant lines of code, the 1st line giving me the error:
objCDOSYSCon.Fields("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1 'whether you use a authentication on the server
objCDOSYSCon.Fields("http://schemas.microsoft.com/cdo/configuration/sendusername") = *******
objCDOSYSCon.Fields("http://schemas.microsoft.com/cdo/configuration/sendpassword") = *****
View Replies
View Related
Using ASP and/or JavaScript, how do you create that little
notification message (usually in red below the submit button) when the
Submit button is pushed. Something that says "Your information is
being sent ..."
View Replies
View Related
Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
[Microsoft][ODBC Microsoft Access Driver] Syntax error (missing operator) in query expression ''I think this experiment is about judging other people on the basis of one's first impression. I don't think it's fair to judge ohters based on first impressions. Most of the times first impressions are crucial in finding people's attitudes or personas, but '.
I am 99% sure that the problem is becase I have a text field box and people are typing in commas, apostropies, ect. How do I get around that? Code:
View Replies
View Related
I have a form that I want the user to fill out. If they dont fill out the whole thing, I want the form to reload and an error message to be displayed at the top of the page. Here is the jist of my code:
View Replies
View Related
I am trying to create a form with just an email address and a text area so I as the administrator can send a customer an email with an attachment. I have the form set up with the email address but I can not get the CDONTS to send the textarea.
I make the textarea the object body but it still does not work. Any help would be appreciated. I was able to do it with ASPEmail but not with CDONTS. I want to be able to open the form and put the customers email address in the form and then a message in the textarea to send them an email also with an attachemnt.
View Replies
View Related
i've got a problem with asp tags in the <body>.Looks like this:
<body <%if len(request.form("field1")) > 0 AND len(variable1) > 0 then %>onload="javascript:testSite1();"<% elseif len(request.form("field2")) > 0 AND len(variable2) > 0 then %>onload=":javascript:testSite2();"<% end if%>>
Now is on the top of my site written: 0 AND len(variable1) > 0 then %>onload="javascript:testSite1();" 0 AND len(variable2) > 0 then %>onload="javascript:test and the caption is not on the top of the site!
View Replies
View Related
i've been using body onload()for ages but since i changed my internet explorer (to 6.02) and OS (XP), i started to get this IE script error and i don't know how to get rid of it.
I read somewhere that if I put the onload event in an inline script tag at the bottom of the my form body, it all works fine, but this doesn't work either.what i should do?
View Replies
View Related
I want to know the difference and effect of placing ASP Code in the begining of .asp File and placing code inside <Head</ HeadTag and Placing code inside <body></bodytag. Just as follows:
1. Placing code in the Begining of asp file
<% Response.write "Hello" %>
<head>....</head>
<body>....</Body>
2. Placing code in the Head
<head <% Response.write "Hello" %</head>
<body>....</Body>
3. Placing code in Body
<head>.....</head>
<body<% Response.write "Hello" %</body>
View Replies
View Related
I'm just learning ASP. I have a mailto and I have a lot of text that I want to display in the body. Is there a way to store that text in a variable & then add it to the mailto tag?
View Replies
View Related
I've created a page for our Call Center that allows them to view a list of resources that can be found on our online catalog. It's a recordset that has a checkbox associated with each title. In addition, there's several fields that they're asked to populate: "From," "To," etc so they can click the links they want to send, attach a customized message and then send it off as an email.
The problem is capturing all of the titles they've checked and publishing that list in an email. Here's the code I'm using to retrieve the results:
For i = 1 to Request.Form("check").count
set RSLink = conn.execute("select * from Master where ISBN = '" & Request.Form("check").item(i) & "'")
response.write x
Next
No problem! But how do I get that list of items that have been "checked" into the body of my email?
View Replies
View Related
We have an unusual situation at the USC School of Medicine; we have to
covert every Web page to a template. The template is too wide to print and a
lot of our students print lectures, notes, etc. We thought we could keep to
the template and draw in the content from other files by using includes. BUT
these files are HTML files and therefore, have Body commands in them. If
this could work, we could put a printable link back to the other page and it
would print. Seems like a great solution except for the extra body commands.
We are using ASP for our scripting.
1. How much of a boondoggle will it be if the files have two body commands
in them. How many browsers would it break?
2. Is there a scripting way around this without creating some objects?
3. Is there something out there -- shareware or commercial -- that would fix
this problem.
4. Could something be done about this using pearl, for example?
We'd really like to do it this way because we can have the users create the
content, use the same file names all the time, thus overwriting the old
file, and the user would never get a chance to screw up the template.
View Replies
View Related
I need some asp which I can use to put between some words within the
body of a page which takes these words and places them inbetween the
title tags.The idea is when an editor changes these tagged words (with
Contribute2), it will also change in the title tags of a page.
View Replies
View Related