Solved

sendmail problem with ASP

Posted on 2001-09-13
31
558 Views
Last Modified: 2007-12-19
this code, working for the last 6 months started giving an error message recently: (I'll cut it a bit, cause I don't wanna bore you with the details)

Function SendMail(strTo, strFromName, strFromAddress, strSubject, ByRef strBody, strContentType)
  Dim Mailer, result

  Set Mailer = Server.CreateObject ("smtpsvg.mailer")
  Mailer.RemoteHost = "mail.ozelhoca.com"
  Mailer.AddRecipient strTo, strTo
...............................
  Mailer.BodyText = strBody
...............................
  SendMail = result
End Function

Function SendMailFromFile(strTo, strFromName, strFromAddress, strSubject, strFile, repArray)
........................
  ' read the message body from file
  Set fso = CreateObject("Scripting.FileSystemObject")
  ' open file as ASCII. The file is Turkish Windows Encoded text
  set file = fso.OpenTextFile(Server.MapPath(strFile), ForReading, FALSE, 0)
  strBody = file.ReadAll
  file.Close
  Set file = Nothing
  Set fso = Nothing

  ' Do the replacements
  Set regEx = New RegExp   'THIS IS LINE 64
.................................
  SendMailFromFile = SendMail (strTo, strFromName, strFromAddress, strSubject, strBody, "")
End Function

OK, the error message I get for this is:

Error Type:
(0x8002801D)
Library not registered.
D:\ROOT\MAMYUN\OZELHOCA.COM\WWW\HOCA\../sendmail.asp, line 64

The error message just doesn't make any sense to me.
Thanks for the help. any working answer will surely be an A.
0
Comment
Question by:kushcu
  • 8
  • 5
  • 4
  • +4
31 Comments
 
LVL 20

Expert Comment

by:jitganguly
ID: 6480011
Hmm .
>>Set regEx = New RegExp   'THIS IS LINE 64
This is supported only in VBScript engine 5 and up. Whats teh version of your IE ? Thats should alse be 5 and up.

Try downloading VBScript engine 5 from here
http://msdn.microsoft.com/scripting/
0
 
LVL 19

Expert Comment

by:daveamour
ID: 6480030
I sometimes get simillar, but not the same, error messages with code that has worked fine for long periods then suddenly stops working.  I have found that often DLL components sometimes unregister for whatever reason.

I would certainly try reregistering your component.  Do you knwo how do do this and what the name of the DLL is that goes with this line (which I am assuming is line 64)

Set Mailer = Server.CreateObject ("smtpsvg.mailer")

Hope this helps, if I'm wrong this wont do any harm so worth a go as it only takes a minute.

Dave


0
 
LVL 19

Expert Comment

by:daveamour
ID: 6480033
Oops I just saw you told us what line 64 is so just forget all by rubbish!

Dave
0
 

Author Comment

by:kushcu
ID: 6480062
OK, first I don't understad why I'd need an IE version 5 and up. (by the way, I'm using IE 5.5) This code is working on the server end, and it tells the server to connect to our mail server and send an email.
I already registered the Set Mailer = Server.CreateObject ("smtpsvg.mailer") at the beginning of the code by the way.
0
 

Author Comment

by:kushcu
ID: 6480070
OK, first I don't understad why I'd need an IE version 5 and up. (by the way, I'm using IE 5.5) This code is working on the server end, and it tells the server to connect to our mail server and send an email.
I already registered the Set Mailer = Server.CreateObject ("smtpsvg.mailer") at the beginning of the code by the way.
0
 
LVL 19

Expert Comment

by:daveamour
ID: 6480080
By register I mean in DOS:

regsvr32 DllName.DLL When in the same folder that the DLL is in.

You dont need IE of any kind as you say this runs on the server as you say.

Dave
0
 

Author Comment

by:kushcu
ID: 6480118
daveamour, the code runs on a web hosting company and is designed to run on IIS windows 2000. I think you have a point though, cause MS' web site something similar.
but do I need to register a .dll for the regex too?
If that .dll is not registered properly on the web host, wouldn't they face similar problems with people using regex?
and how do I register the stuff?
thanks.
0
 
LVL 19

Expert Comment

by:daveamour
ID: 6480140
I dont know anything about Regex I'm afraid.  If it is a Com+ object thought then it may be experiencing registration problems and it could be worth checking with your ISP if this is the case.

Dave
0
 
LVL 18

Expert Comment

by:mgfranz
ID: 6480155
RegExp() is a portion of the VB5 Scripting Engine, it is installed on the server, any .dll's associated with the RegExp() call are registered at this time.

IE is not an issue unless you are running the RegExp client-side.

It is quite possiible that it is time to update your script engine, 5.5 is stable, 5.6 is still in beta.  http://www.microsoft.com/msdownload/vbscript/scripting.asp
0
 
LVL 20

Expert Comment

by:jitganguly
ID: 6480162
IIS on WIn2k should be fine.
Did it work before on the web hosting companys server ?  Because the web hosting companies sometime do not allow FSO, becuase of teh security reason you could read/write their drive. So check with the web server company whether they allow using File system object
0
 
LVL 18

Expert Comment

by:mgfranz
ID: 6480181
Good point JIT... I ran into this in the past with one of those "cheapy hosts..."
0
 
LVL 20

Expert Comment

by:jitganguly
ID: 6480253
See this link. There could be a problem with the security of the registry.

http://support.microsoft.com/directory/article.asp?ID=KB;EN-US;Q274038
0
 
LVL 27

Expert Comment

by:Asta Cu
ID: 6906967
Please update the experts here who have so willingly stepped in to help you, since much time has passed since your last comments, and Email notifications may not have been generated to the participating experts here due to some problems at that time.

Somewhat off-topic, but important.

****************************** ALERT********************************
WindowsUpdate - Critical Update alert March 28, 2002 from Microsoft
http://www.microsoft.com/technet/treeview/default.asp?url=/technet/security/bulletin/ms02-015.asp
Synopsis:
Microsoft Security Bulletin MS02-015  
28 March 2002 Cumulative Patch for Internet Explorer
Originally posted: March 28, 2002
Summary
Who should read this bulletin: Customers using Microsoft® Internet Explorer
Impact of vulnerability: Two vulnerabilities, the most serious of which would allow script to run in the Local Computer Zone.
Maximum Severity Rating: Critical
Recommendation: Consumers using the affected version of IE should install the patch immediately.
Affected Software:
Microsoft Internet Explorer 5.01
Microsoft Internet Explorer 5.5
Microsoft Internet Explorer 6.0

Thought you'd appreciate knowing this.
":0)
Asta
0
 

Author Comment

by:kushcu
ID: 6907884
I've tried peoples' updates, but the proposed solutions didn't work. I'll get back to this post some time this summer, and give the points to someone chosen randomly.
0
 
LVL 1

Expert Comment

by:Moondancer
ID: 6907958
ADMINISTRATION WILL BE CONTACTING YOU SHORTLY.  Moderators Computer101 or Netminder will return to finalize these if still open in seven days.  Please post closing recommendations before that time.

Question(s) below appears to have been abandoned. Your options are:
 
1. Accept a Comment As Answer (use the button next to the Expert's name).
2. Close the question if the information was not useful to you, but may help others. You must tell the participants why you wish to do this, and allow for Expert response.  This choice will include a refund to you, and will move this question to our PAQ (Previously Asked Question) database.  If you found information outside this question thread, please add it.
3. Ask Community Support to help split points between participating experts, or just comment here with details and we'll respond with the process.
4. Delete the question (if it has no potential value for others).
   --> Post comments for expert of your intention to delete and why
   --> You cannot delete a question with comments, special handling by a Moderator is required.

For special handling needs, please post a zero point question in the link below and include the URL (question QID/link) that it regards with details.
http://www.experts-exchange.com/jsp/qList.jsp?ta=commspt
 
Please click the Help Desk link on the left for Member Guidelines, Member Agreement and the Question/Answer process for further information, if needed.  http://www.experts-exchange.com/jsp/cmtyHelpDesk.jsp

Click you Member Profile to view your question history and keep them all current with updates as the collaboration effort continues, to track all your open and locked questions at this site.  If you are an EE Pro user, use the Power Search option to find them.  Anytime you have questions which are LOCKED with a Proposed Answer but does not serve your needs, please reject it and add comments as to why.  In addition, when you do grade the question, if the grade is less than an A, please add a comment as to why.  This helps all involved, as well as future persons who may access this item in the future to seek help.

To view your open questions, please click the following link(s) and keep them all current with updates.
http://www.experts-exchange.com/questions/Q.20170225.html
http://www.experts-exchange.com/questions/Q.20182463.html
http://www.experts-exchange.com/questions/Q.20280974.html
http://www.experts-exchange.com/questions/Q.20281360.html




PLEASE DO NOT AWARD THE POINTS TO ME.  
 
------------>  EXPERTS:  Please leave any comments regarding your closing recommendations if this item remains inactive another seven (7) days.  Also, if you are interested in the cleanup effort, please click this link http://www.experts-exchange.com/jsp/qManageQuestion.jsp?ta=commspt&qid=20274643

Moderators will finalize this question if still open in 7 days, by either moving this to the PAQ (Previously Asked Questions) at zero points, deleting it or awarding expert(s) when recommendations are made, or an independent determination can be made.  Expert input is always appreciated to determine the fair outcome.
 
Thank you everyone.
 
Moondancer
Moderator @ Experts Exchange

P.S.  For any year 2000 questions, special attention is needed to ensure the first correct response is awarded, since they are not in the comment date order, but rather in Member ID order.
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 

Author Comment

by:kushcu
ID: 6908739
I found the following online info. that seemed relevant, but didn't solve my problem. I thank all the experts for the help, but since my problem still persists wish to close the question.

http://brinkster.com/forums/forummessage.asp?id=28415&Forum=2
0
 
LVL 27

Accepted Solution

by:
Asta Cu earned 150 total points
ID: 6913723
I've seen this problems before, and frequently found it  can occur when a file on which the Rsabase.dll, Rsaenh.dll, or Schannel.dll file depends is missing or damaged.  This may help you overcome this problem, and is unique to IE 5.5.

http://support.microsoft.com/search/preview.aspx?scid=kb;en-us;Q309288

Also this...
OLE error code 0x8002801d
The complete error message usually appears as follows:

OLE error code 0x8002801d: Library not registered.

This error occurs when you have loaded X-Link on a machine not setup for English (United States). It is a confirmed bug in Microsoft Visual FoxPro 6.0 by Microsoft in article Q195261. It occurs when the regional setting for the computer on which X-Link is running has been set to something other than "English (United States)". Two workarounds have been identified by Microsoft:

1. The user should change his regional setting to "English (United States)". This setting is in the control panel - regional settings icon. No reinstallation of X-Link is required after the change is made.

2. Easy Business Software is currently testing the programming workaround suggested by Microsoft and may release an update which avoids the problems with regional settings. Watch the X-Link support/update site for notices of possible updates.
------------
When you call a method of a COM object written in Visual FoxPro 6.0, the following error might appear:

OLE error code 0x8002801d: Library not registered

http://support.microsoft.com/default.aspx?scid=kb;en-us;Q195261


0
 
LVL 1

Expert Comment

by:Moondancer
ID: 6966185
Has the added information helped you here?
Moondancer - EE Moderator
0
 

Author Comment

by:kushcu
ID: 6989646
no, it didn't. even though the error message numbers are the same, my problem is with creating the RegExp object.
0
 
LVL 18

Expert Comment

by:mgfranz
ID: 6992060
Post your RegExp code.

I have used RegExp quite extensively in many .asp files, here is a simple example;

Dim objRegEx, Match, Matches, StrReturnStr
Set objRegEx = New RegExp
objRegEx.Global = True
objRegEx.IgnoreCase = True
objRegEx.Pattern = "~[^/]*"
Set Matches = objRegEx.Execute(strPhrase)
'count = 0
For Each Match in Matches

     theStr = Match.value
     theStr = Replace(theStr, "~", "")
     Response.Write theStr
Next
0
 

Author Comment

by:kushcu
ID: 6992127
the problem is with the regexp component. It worked fine, and then due to a problem with our web hosting company -some upgrade or something- (which they constantly refuse), it just doesn't work anymore. when i comment out the new regexp, things work fine.
0
 
LVL 18

Expert Comment

by:mgfranz
ID: 6992191
Well, since you have already answered your question, why are you not thumping the Hosting Co. for answers.

What happens when you run this code?

<%
sString = "this is link1, link2 and link3"
Response.Write "Search string:" &sString

Set RegX = NEW RegExp
SearchPattern = "link"
RegX.Pattern = SearchPattern
RegX.Global = True
ReplacedText = RegX.Replace(sString, "a"&RegX.Pattern)

Response.Write "<p>New String: "&ReplacedText
%>
0
 
LVL 1

Expert Comment

by:Moondancer
ID: 7055077
Are we done here?  Too much time passes, kushcu, before you respond; please remain active in "your" questions.
Moondancer - EE Moderator
0
 
LVL 18

Expert Comment

by:mgfranz
ID: 7055087
Yeah were done...

I suggest docking kushcu 150 for jit, dave, astaec and myself... :-|

Mark
0
 
LVL 1

Expert Comment

by:Moondancer
ID: 7055135
I agree with point splits, but have asked our Administrator for a second opinion here as well.
Thanks a lot, as always, for responding and helping, Mark.
Moondancer - EE Moderator
0
 

Expert Comment

by:ComTech
ID: 7055389
Well if this sort of thing is known, that it CAN be done, a lesson on running away with the answer, perhaps so many will not be tempted again.  

I did send an email, that he was getting low on points, and had best take care of his questions, the Experts did their part, so can the Users.

Kind regards all,

ComTech
CS Admin @ EE


150 for jit, dave, astaec and myself.
Mark

Done!!! everyone claim your points.  :>
0
 

Expert Comment

by:ComTech
ID: 7055401
0
 
LVL 27

Expert Comment

by:Asta Cu
ID: 7056623
Thank you very much.
":0) Asta
0
 

Expert Comment

by:ComTech
ID: 7056684
You all are welcome, as all points have now been picked up, this question is now in PAQ as answered.

Thanks all,

CT  :>
0
 

Author Comment

by:kushcu
ID: 7057534
I'm not running away with my question points, and I reply to every message ASAP if I believe they will lead to somewhere. Check the dates on my postings, and is it my fault that I surfed the web and found an answer within the following month or so about the question?

I have some other questions open, and I really don't care about the points. I do give points if they show me the way. (only showing the way is enough, please refer to my other questions.)
 
Honestly, most of the answers were about client side problems, and it doesn't help a lot when the question is about the server side. ComTech, if you waited for a day before closing the question, I could have given the points to the answer that's relevant to the question.

Finally, I had no intention or whatever to take the experts' time, and run away with the points. I don't want to be cheap, I'll keep this in mind next time, and will definitely give points to someone. I thank you all for taking your time and responding to the question.  
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Suggested Solutions

I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:  The Exchange of information …
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now