Solved

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

Posted on 2003-11-12
5
80,565 Views
Last Modified: 2012-05-04
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>
0
Comment
Question by:tldrio
5 Comments
 
LVL 33

Expert Comment

by:hongjun
ID: 9731179
You need to install AspEmail
Get it from www.aspemail.com

hongjun
0
 
LVL 58

Accepted Solution

by:
Gary earned 500 total points
ID: 9731223
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
 

Author Comment

by:tldrio
ID: 9731547
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
 
LVL 58

Expert Comment

by:Gary
ID: 9733215
Change it to Mail.Send
0
 

Expert Comment

by:jwright1
ID: 13512553
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

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Hello, all! I just recently started using Microsoft's IIS 7.5 within Windows 7, as I just downloaded and installed the 90 day trial of Windows 7. (Got to love Microsoft for allowing 90 days) The main reason for downloading and testing Windows 7 is t…
I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

713 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