Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Mailer Object Problems..

Status
Not open for further replies.

matthewking

Programmer
Jul 15, 2002
75
ES
Hi,

Im using this to try to send a text string which contains html incase that makes a difference. But am getting this error:

Error Type:
Server object, ASP 0177 (0x800401F3)
Invalid class string
/includes/thankyou.asp, line 261


The error line is where I try to set the mailer object. Heres the code:

'Create the mailer object
Dim Mailer

Set Mailer = Server.CreateObject("SMTPsvg.Mailer") -- Error Line
Mailer.Organization = "website.com"
Mailer.FromName = "Customer Services"
Mailer.FromAddress = "sales@website.com"
Mailer.RemoteHost = "123.123.123.123"
Mailer.Subject = "subject bleh"
Mailer.CharSet = 2
Mailer.ConfirmRead = true
Mailer.ReturnReceipt = true
Mailer.BodyText = strHTML
Mailer.ADDRecipient "Matt","matt@bleh39329932.com"
Mailer.SendMail

Set Mailer = Nothing

I cant work out why I would be getting this error, its the first time I've tried mailing something from an ASP page so I may be missing the obvious. Im pretty sure we have whats needed on the server because other developer have used it on the same server.

Thanks,
Matt.
 
The SMPTsvg object is part of the ASPMail component. You should make sure that this component is installed on the server you are using, and if it is, make sure it is installed corerectly.

Their documentation and troubleshooting is quite good:

Palooka
 
I've had success w/CDONTS, which I think is installed by default w/at least NT4. Darrell Mozingo
MCSA, A+, Network+, i-Net+, MOUS 2000 Master
 
Thanks Palooka, Mozingod.

I Cant work out whats wrong with ASPMail so I think I'll give CDONTS a try.
 
Becareful with CDONTS esp on NT4 Option Pack because there is a bug. Generally, I don't recommend using CDONTS object for mailing purposes. ASPMail is the better choice. The error you got is quite definate that the ASPMail object is not installed properly.

This is a silly thought, but I'll point out (just in case you missed this). The ASPMail is installed on the server. Did you run the code on the client PC (as in debugging the code) or the server? If you are debugging and running the code on the client PC, then ASPMail should be installed on your PC too.

For more documentation on ASPMail2.0, take a look at this: (not my site)

cheers. ~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-
Visit --> for (Replica) Watches, Pen, Handbags, Hats, Jerseys and more ... at prices that makes your code spin ...
~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top