Link to home
Start Free TrialLog in
Avatar of kushcu
kushcu

asked on

sendmail problem with ASP

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.
Avatar of jitganguly
jitganguly

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/
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


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

Dave
Avatar of kushcu

ASKER

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.
Avatar of kushcu

ASKER

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.
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
Avatar of kushcu

ASKER

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.
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
Avatar of Mark Franz
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
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
Good point JIT... I ran into this in the past with one of those "cheapy hosts..."
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
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
Avatar of kushcu

ASKER

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.
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.
https://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.  https://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.
https://www.experts-exchange.com/questions/Q.20170225.html
https://www.experts-exchange.com/questions/Q.20182463.html
https://www.experts-exchange.com/questions/Q.20280974.html
https://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 https://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.
Avatar of kushcu

ASKER

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
ASKER CERTIFIED SOLUTION
Avatar of Asta Cu
Asta Cu
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Has the added information helped you here?
Moondancer - EE Moderator
Avatar of kushcu

ASKER

no, it didn't. even though the error message numbers are the same, my problem is with creating the RegExp object.
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
Avatar of kushcu

ASKER

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.
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
%>
Are we done here?  Too much time passes, kushcu, before you respond; please remain active in "your" questions.
Moondancer - EE Moderator
Yeah were done...

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

Mark
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
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.  :>
Thank you very much.
":0) Asta
You all are welcome, as all points have now been picked up, this question is now in PAQ as answered.

Thanks all,

CT  :>
Avatar of kushcu

ASKER

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.