CDO.Send Returns Error '8004020f'
I'm trying to set up a very simple asp page that sends me an email when it runs. This is just to try and get CDOSYS working so I can send out emails from my website.
Everything is fine right up until I execute the ".Send" method.
What could be wrong? What does the error mean?
The output from the source below is:
"test1 error '8004020f'
/mailtest.asp, line 34"
Here it is: Code:
View Replies
ADVERTISEMENT
I am using this code:
[code].....
to send email, however i get error '8004020f' on the objMessage "send" line
this code works usually, however for some reason i get this error on this site.....
View Replies
View Related
Does anybody have an idea why is this happening. The following code works
great on my development machine (windows 2000 pro), but on the test server
(Windows 2000 Server) it can only send emails to addresses on our domain. If
I specify other address I just get a 8004020f error message. The smtp server
I'm trying to send is on a separate machine (Windows NT Server).
I think it has something to do with web server configuration, or even maybe
smtp server? But the fact that I can send it from my machine throws me
off... I also tried a Perl script to send email using the same smtp server
and I have the same problem, works from my machine, fails on test server.
Anyone came across something like that? Code:
View Replies
View Related
My page sends an email using CDO to a username pulled from a database as follows:
With cdoMessage
Set .Configuration = cdoConfig
.From = "Admin <admin@MyCompany.com>"
.To = rs("USERName") & "@MyCompany.com"
.Subject = "Notification #" & rs("subject_Num")
.TextBody = txtVar
.Send
End With
this works great so long as USERName isn't garbage. If there are bad characters in it that IIS doesn't like, it get an error '8004020f' at the .send line.
I was wondering if there was an easy and / or publicly available code snippet that could check the user name for special chars. Ideally, it would email me if there was a problem with the USERName rather than just strip the bad chars out and send it to whatever is left.
View Replies
View Related
I have a client with a site that users can register at, we collect their
emails, if they have one, in an Access db. I have a page that uses CDOSYS to
send messages to those emails but I am getting "error '8004020f" when I do
this.
About 75% of the members have emails so some email fields in the db
are empty. One issue with my webhost is that I cannot send by CDOSYS more
than 99 emails at a time, so I select all emails where the ID is less than
97, that is about 85 emails total. After the first group goes out the page
redirects to another page so the next group can go out. Code:
View Replies
View Related
I'm having a bit of trouble with an ASP form that I'm maintaining. Someone else wrote it and I'm new to CDO objects. I have a CDO.Message and a CDO.Configuration.
I set up the configuraton fields for the port and smtp server's ip address to be used. The configuration property of the message is set to be the new configuration object.
Then there's a ton of stuff appending bits and pieces to the text body.
Finally we have the message's Send method being called. That's where it breaks.
It seemed to just stop working one day. When I submit the form, the message returned is simply:
error '8004020f'
I know from the MSDN website that this error code means 'Failure in obtaining user token.' What I don't know is how to fix it!
View Replies
View Related
The following code with formatnumber function returns me the following code. Why?
<td align="right"><Font
class=content4><%=formatNumber(ars.Fields("SOLD_AMOUNT"),2)%></td>
Microsoft VBScript runtime error '800a000d'
Type mismatch: 'formatNumber'
View Replies
View Related
Is it possible to redirect the server to another ASP page if the requested page throws an error? I want to redirect the user to a custom error page and then send the webmaster an email that contains the error message.
View Replies
View Related
I patched lastnight. My cdo send email code worked until this AM. The code has been working for months on my 2003 web server relaying to my exchange 2003 server. I now get
error '80040211'
/Ricweb/standards/testemail.asp, line 35 .....
View Replies
View Related
I have a small problrm in sending mail in HTML
I'v done this code, but.:
Code:
Private sub SendMail()
MailBefore = "<html>" & chr(13)
MailBefore = MailBefore & "<head><title>" & MailSubject & "</title></head>" & chr(13)
MailBefore = MailBefore & "<body>"
MailBody = MailBefore & MailBody & "</body></hmtl>"
select case strMailMethod
case "cdonts":
SendCdonts()
I receive like this....:
View Replies
View Related
I have created a New Users registration form for my database. The User enters there details such as email, account, name etc, and then clicks a Register button. This should send an e-mail to the User with a link for them to click to activate there account.
When i click on register however, i get a page not found message. When i try to diplay my Confirmation page, i get the error mention ed above.
View Replies
View Related
I currently am posting data to another site with ASP and in return that site returns a page that is XML. How can I grab this data programatically?
This is what the returned page looks like:
<?xml version="1.0" encoding="UTF-8" ?>
- <!-- Turnitin API Return Data
-->
- <returndata>
<rmessage>Successful!</rmessage>
<originalityscore>92</originalityscore>
<rcode>61</rcode>
</returndata>
View Replies
View Related
i am trying harder to mix this 2 solutions... but without success... the below on seen to be grabing a template and replace the data with the values posted in a form Code:
View Replies
View Related
I have the following:-
<tr>
<td width="20%"><b>Typical Playing Hours</b></td>
<td width="80%"><textarea rows="3" name="TIMEON" cols="40"></textarea></td>
</tr>
Which users insert what time people usually play..
but if someone enters
Sat 10-11
Sun 13-15
it enters into the database as
Sat 10-11 Sun 13-15
how can i get it to carry the carrige return then it inserts it into my databaes?
View Replies
View Related
i am making a recordset paging in asp. the problem is the Previous Page, Next Page, and the Last Page wont work. only the first page is working. i have found out that the "pagenum" value is always equal to zero(0). could anybody help me with this problem? Code:
View Replies
View Related
how I can keep the formatting (carriage returns) that the user enters into a memo field and then display that later. I figured I might be able to use:
'replace carriage returns with BRs
comment=Replace(comment, chr(13), "<br>")
but obviously net.!
The <pre> tag doesn't sem to help either as the embedded return is lost by the time you get past Request.Form
View Replies
View Related
I have a long list of checkboxes and a text field is associated with
each checkbox. So I created a loop that should get the value of each
text field that has a marked checkbox next to it. Here's my code
for each g in gildi
aths = Request.Form("rok_" & g)
...
next
then I create a query with the value and send it. Anyway here's my
problem:
the aths variable gets the correct value on the first iteration but is
blank every time after that.
View Replies
View Related
I am using asp to retrieve data from an SQL Server database and display it on a web page. The data in the database has been formatted using multiple carriage returns however, when the data is displayed on the page these carriage returns are lost.
View Replies
View Related
I am trying to run a command line from an ASP page. I am using windows 2003 with IIS6. I am able to get this to run on my local machine (Windows XP IIS5). Here is my code:
View Replies
View Related
using mysql - vbscript and oledb provider
I have a table with 2 records
I do this in asp
rs.open "select count(*) as countervar from sqltable" ,oconn,1,1
response.write rs(0).value or response.write rs(0) gives zero and not 2 as to be expected
Also I would also like to be able to do calculations like this
rs.open "select 10 * 2 as result" ,oconn,1,1
response.write rs(0) also gives zero and not 20 as expected
can't this be done?
View Replies
View Related
What does ADO.RecordSet.Open return when the SQL query is an UPDATE or INSERT query?
View Replies
View Related
The code referer = request.servervariables("HTTP_REFERER") used to return a
requesting URL. It now returns blank. Anyone any idea what is happening?
View Replies
View Related
I have this code and it keeps spitting out -1 when I know there are 9 records, please help me.
Randomize
DIM cat,random_number(), counter, check,count
cat = Request("category")
Set cnn1 = Server.CreateObject("ADODB.Connection")
openStr = "driver={Microsoft Access Driver (*.mdb)};" & _
"dbq=" & Server.MapPath("database/images.mdb")
cnn1.Open openStr,"",""
sql = "SELECT * FROM gallery WHERE category = '" & cat & "' Order by ID"
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open sql, cnn1, adOpenDynamic, adLockOptimistic, adCmdText
count = rs.RecordCount
redim random_number(9)
View Replies
View Related
I have this sql query
SQL="SELECT title,body FROM cinema WHERE date_end > #" &date()& "#"
cinema is a table which contains announcements about cinema title,body (txt fields)are columns of my a table called cinema date_end(DATE/Time Field): is a date (DD/MM/YYYY, short format).This date shows when the announcements expire .But SQL returns all the announcements that the table contains even those that have already expired. Why??I cant find any mistake.
View Replies
View Related
I have a form with a <textarea></textarea> to receive user input. This input is then stored in a database and sent by fax... I need to be able to remove the carriage returns (enter key... vbcrlf...) from the input so that somebody doesn't do something like fill the textarea with 100s of keypresses of the enter key and end up spitting out tonnes of
blank pages on the fax machine.
View Replies
View Related
I am using asp to retrieve data from an SQL Server database and display it on a web page. The data in the database has been formatted using multiple carriage returns however, when the data is displayed on the page these carriage returns are lost. Does anyone know a way around this problem?
View Replies
View Related
I am working with NT4 and when I do a Response.write it returns the value ???????. I have been developing for many years now and this is the first time I have seen this. The IIS version is 3 (I think), and we are running the same setup on two other systems and neither of the other systems have this problem.
View Replies
View Related
I have a text box that a user is allowed to enter what ever text they wish. I then take the text store it in a Database, and at a later time print it in a document. All that part I have done.
The problem I'm having is I have a client that hits return at the end of their last sentance. When this prints on the document, it sometimes causes an extra blank page to be produced to account for the last carriage return, depending on how much text they have entered.
What I'm looking to do is take out any whitespace or un-needed carriage returns at the end of the string.
View Replies
View Related
My email application was working a couple of weeks ago, then all of a sudden I get
Error Type:
(0x8009000F)
Object already exists.
I checked the permissions on the machinekeys directory
like the KB article said it still doesn't work. Does
have any ideas? Code:
View Replies
View Related
I'm writing an ASP page calling stored procedure from my database, in which I used Command Object. However, I can't get the pagecount or recordcount by the command: objRst.pagecount or objRst.recordcount since it returns -1, which, from the documentation, means these methods are not supported for some strange reason.
I'm thinking maybe it's becasue I used the Command Object with stored procedure. However, if I put my sql query into a string and then open it from a connection obj, the pagecout method would work fine.
The code is as follow:
====================
dim param
... ...
Set objConn = Server.CreateObject("ADODB.Connection")
Set objCmd = Server.CreateObject("ADODB.Command")
set objRst = Server.CreateObject("ADODB.RecordSet")
objConn.Open strLogin
objCmd.ActiveConnection = objConn
objCmd.CommandText = "test.my_procedure.method1"
objCmd.CommandType = 4
objCmd.Parameters.Append objCmd.CreateParameter("param", 200,1,50,param)
set objRst = objCmd.Execute
objRst.CursorLocation = adUseClient
'objRst.Source = objCmd [NOT SURE IF CORRECT, so cmt out, but doesn't affect my question]
objRst.CursorType = adOpenStatic
myrecordcount = objrst.PageCount [RETURNS -1 !! :confused: ]
======================================
View Replies
View Related
I'm writing a work schedule application in ASP, and I am using an Access 2000 DB with the following tables:
WorkSchedule
--------------------------
| ID | Date | EmployeeID |
| .
| .
| .
Employees
---------------------
| EmployeeID | Name |
| .
| .
| .
Status
----------------------------------------------------
| StatusID | DateFrom | DateTo | EmployeeID | Type |
| .
| .
| .
I need to retrieve a list of employees, which are not scheduled for work between the given dates and which have no status (sick leave, maternity leave etc). The object is to see which employees are available for scheduling on the different dates.
The resulting table/recordset should contain one record per date per available employee (see example below). Code:
View Replies
View Related
I have been using this script which basically works fine, with on hitch. I populate a recordset from a database. Then, use the total number of records as a UBound.
I then want to display 9 random records. I get my 9 random images, but for some reason, if I do a sort by ID on the database, the lowest numbered ID file never comes up in the list. Here is my code: Code:
View Replies
View Related
If I want to remove x-amount of trailing carriage returns from a string in ASP (ie, someone has entered text into a text area and left a few carriage returns) - what's the easiest way to do this?
Trim() only removes white space
Also, I don't want to remove carriage returns within the main body of submitted text.
Any ideas if there's an easy way to do this?
View Replies
View Related