Microsoft VBScript runtime error '800a01a8', Object required: 'Mailer'

Firstly, I am not a web designer by any means.  My company has a 3rd party do the design and well apparently they don't know exactly what they are doing.  I have been fixing the designers page erroes on every *.asp page he sends, but I don't have a clue how to rectify this one:

Microsoft VBScript runtime error '800a01a8'

Object required: 'Mailer'

/inquiry.asp, line 19   (Mailer.BodyText = strMsgHeader & strMsgInfo & strMsgFooter)



The designer added lines 10-22.  Since this addition, I get the above error.  Any suggestions?

Copy of the coding:


<%
   Set Mail = Server.CreateObject("Persits.MailSender")
   Mail.Host = "smtp_gw.oceanelectric.net; smtp.oceanelectric.net"
   Mail.From = "test@testing-AspMail-do-not-reply.com"
   Mail.FromName = "inquiry"
   Mail.AddAddress Request("recipient")
   Mail.Subject = Request("Subject")
   Mail.Body = Request("body")

For Each Item in Request.Form
strMsgInfo = strMsgInfo & Item & ": " & Request.Form(Item) & vbCrLf
Next

strMsgHeader = "Form information follows:" & vbCrLf
strMsgHeader = strMsgHeader & "*************" & vbCrLf
strMsgFooter = "*************"


Mailer.BodyText = strMsgHeader & strMsgInfo & strMsgFooter

If Mailer.SendMail Then
Set Mailer = Nothing

      strErr = ""
      bSuccess = False
      On Error Resume Next ' catch errors
      Mail.Send      ' send message
      If Err <> 0 Then ' error occurred
                  strErr = Err.Description
      else
                  bSuccess = True
      End If
End If
%>

<center>
            <table width=760>
               <tr>
                  <td bgcolor=FFFFFF>
                     <table width=760 cellpadding=0 cellspacing=0>
                        <tr>
                           <td valign=top bgcolor=#282C68>
                               <table>
                                  <tr>
                                     <td colspan=2 valign=bgcolor=#282C68>
                                        <img src=images/header.jpg alt="About Ocean Electric" width="760" height="120">
                                     </td>
                                  </tr>
                                  <tr>
                                     <td valign=top width=160>
   <SCRIPT LANGUAGE = "JavaScript">
<!--
    if (document.images) {
//
    img000over = new Image();
    img000over.src = "mo/nav-on000.gif";
    img001over = new Image();
    img001over.src = "mo/nav-on001.gif";
    img002over = new Image();
    img002over.src = "mo/nav-on002.gif";
    img003over = new Image();
    img003over.src = "mo/nav-on005.gif";
    img004over = new Image();
    img004over.src = "mo/nav-on003.gif";
    img005over = new Image();
    img005over.src = "mo/nav-on004.gif";
//
    img000out = new Image();
    img000out.src = "mo/nav-off000.gif";
    img001out = new Image();
    img001out.src = "mo/nav-off001.gif";
    img002out = new Image();
    img002out.src = "mo/nav-off002.gif";
    img003out = new Image();
    img003out.src = "mo/nav-off005.gif";
    img004out = new Image();
    img004out.src = "mo/nav-off003.gif";
    img005out = new Image();
    img005out.src = "mo/nav-off004.gif";
}

// Function to show active images.
function imgOver(imgName) {
    if (document.images) {
        document[imgName].src = eval(imgName + "over.src");
    }
}

// Function to show inactive images.
function imgOut(imgName) {
    if (document.images) {
        document[imgName].src = eval(imgName + "out.src");
    }
}

// -->
</SCRIPT>

<img src=images/house-left.jpg width="160" height="128">
<br>
<TABLE CELLSPACING = 0 CELLPADDING = 0 BORDER = 0>
<!-- Table starts with a dummy row to force correct cell widths -->
<!-- Each row starts with a dummy to force correct cell heights -->
<TR><TD WIDTH = 0 HEIGHT = 0></TD><TD WIDTH = 180 HEIGHT = 0></TD></TR><TR><TD WIDTH = 0 HEIGHT = 31></TD><TD><A HREF = "about.html" onMouseOver = "imgOver('img000')" onMouseOut = "imgOut('img000')"><IMG
NAME = "img000" SRC = "mo/nav-off000.gif" BORDER = 0 width="180" height="31"></A></TD></TR><TR><TD WIDTH = 0 HEIGHT = 29></TD><TD><A HREF = "securenet.html" target=_blank onMouseOver = "imgOver('img001')" onMouseOut = "imgOut('img001')"><IMG
NAME = "img001" SRC = "mo/nav-off001.gif" BORDER = 0 width="180" height="29"></A></TD></TR><TR><TD WIDTH = 0 HEIGHT = 29></TD><TD><A HREF = "http://www.garagetek.com" target=_blank onMouseOver = "imgOver('img003')" onMouseOut = "imgOut('img003')"><IMG
NAME = "img003" SRC = "mo/nav-off005.gif" BORDER = 0 WIDTH = 180 HEIGHT = 29></A></TD></TR><TR><TD WIDTH = 0 HEIGHT = 31></TD><TD><a HREF="http://www.oceanelectric.net/contact.html" onMouseOver="imgOver('img004')" onMouseOut="imgOut('img004')"><IMG
NAME = "img004" SRC = "mo/nav-off003.gif" BORDER = 0 width="180" height="31"></a></TD></TR><TR><TD WIDTH = 0 HEIGHT = 33></TD><TD><A HREF = "index.html" onMouseOver = "imgOver('img005')" onMouseOut = "imgOut('img005')"><IMG
NAME = "img005" SRC = "mo/nav-off004.gif" BORDER = 0 width="180" height="33"></A></TD></TR></TABLE>
                                 </td>
                                 <td valign=top bgcolor=#FFFFFF>
                                    <font face=arial,helvetica size=-1>
                                       <blockquote>
                                       <br>
                                       <b>Thank you for your inquiry! An Ocean Electric sales representative will contact you shortly.
                                       </blockquote>

                              <center>

                                    <img src=images/logo-sm.gif width="137" height="44">
                                       <font size=-2 face=arial,helvetica>
                                          <br>
                                             99 Mariner Drive<br>
                                             Southampton, NY 11968<br>
                                             Phone: (631) 287-6060 Fax: (631) 287-0731
                                          <br>
                                          <br>
                                       </font>
                                 </td>
                              </tr>
                           </table>
                        </td>
                     </tr>
                  </table>
               </td>
            </tr>
         </table>
tldrioAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

hongjunCommented:
You need to install AspEmail
Get it from www.aspemail.com

hongjun
0
GaryCommented:
Sack him!

The email component is being set to Mail...
 Set Mail = Server.CreateObject("Persits.MailSender")

then you're using Mailer later in the code ergo the error.  Not sure which it's meant to be since you're setting the body content here
 Mail.Body = Request("body")

the you build up a string and are setting the body to something else.
Mailer.BodyText = strMsgHeader & strMsgInfo & strMsgFooter

So amended your code to use both then you can let us know which it should be



<%
  Set Mail = Server.CreateObject("Persits.MailSender")
  Mail.Host = "smtp_gw.oceanelectric.net; smtp.oceanelectric.net"
  Mail.From = "test@testing-AspMail-do-not-reply.com"
  Mail.FromName = "inquiry"
   Mail.AddAddress Request("recipient")
  Mail.Subject = Request("Subject")

For Each Item in Request.Form
strMsgInfo = strMsgInfo & Item & ": " & Request.Form(Item) & vbCrLf
Next

strMsgHeader = "Form information follows:" & vbCrLf
strMsgHeader = strMsgHeader & "*************" & vbCrLf
strMsgFooter = "*************"


Mail.Body = Request("body") & strMsgHeader & strMsgInfo & strMsgFooter

If Mail.SendMail Then
Set Mail = Nothing

     strErr = ""
    bSuccess = False
    On Error Resume Next ' catch errors
    Mail.Send     ' send message
    If Err <> 0 Then ' error occurred
              strErr = Err.Description
    else
              bSuccess = True
    End If
End If
%>
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
tldrioAuthor Commented:
GaryC123:  thanks for the insight.  As I mentioned, I am a complete novice and I am left holding the bag due to someone elses incompetence.  To get a better idea as to what I am dealing with go to www.oceanelectric.net/contact.html.  The object is to pull the populated fields into the body of the e-mail.  I was able to get the form to work when the designer couldn't.  I sent the inquiry.asp back to him so he could input the coding to pull all info into the body of the e-mail.  This is what I got back.  He added lines 10 - 22.

I am using aspemail and it works great once I remove the above mentiond lines, with the exception that nothing appears in the body.

When I make the changes you suggested I get:

Microsoft VBScript runtime error '800a01b6'

Object doesn't support this property or method: 'Mail.SendMail'

/inquiry.asp, line 22

All insight is greatly appreciated.
0
GaryCommented:
Change it to Mail.Send
0
jwright1Commented:
This is an example of how the syntax shold be:

Persits object (VBScript - Classic ASP 3.0)
The code is below here:
 
Set Mail = Server.CreateObject("Persits.MailSender")
Mail.Host = "mail.yourdomain.com"
Mail.Username = "emailaddress@yourdomain.com"
Mail.Password = "your password"
Mail.From = "webmaster@yourdomain.com"
Mail.FromName = "Your Name"
Mail.AddAddress "recipient@somedomain.com"
Mail.AddCC "you@yourdomain.com"
Mail.Subject = "Subject goes here"
Mail.Body = "Message body goes here"
On Error Resume Next
Mail.SendToQueue
Set Mail = Nothing
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ASP

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.