March 28th, 2004, 09:43 AM
Send Mail using vbscript
I'm new to vbscript, asp & IIS.
I've configured IIS in my computer and it's working fine. Every one in my local network can just type my computer's name and see my default page in their web browsers.
I've already installed smtp server in my system, but have no idea how to work on it and how to send mails using my smtp server. I've tried & searched most of the sites where I can look for a simple example or a help.
In most of the examples, I've seen (says simple again)
but when I tried to see the page in browser, I got an error message as follows
Server object, ASP 0177 (0x800401F3)
Invalid class string
/mail.asp, line 3
What does that mean ? How can have this class installed in my system ? What r the steps. How can I send e-mails with just SMTP installed without using any activex controls ?
Can I also receive mails ?
Any help on this regard will be heighly appreciated!
March 28th, 2004, 01:13 PM
What windows? In XP and 2003, CDONTS is not installed, instead CDOSYS is installed. Search msdn for details on using the CDOSYS object.
The man who doesn't read good books has no advantage over the man who can't read them.
April 1st, 2004, 02:44 AM
Thank you very much Mr. Doug!
Though I have not tried with CDOSYS in XP, I could do what I wanted with CDONTS in my web server.
The codes I used is as follows:
Set MailObj = Server.CreateObject("CDONTS.NewMail")
MailObj.From = "Web <email@example.com>"
MailObj.Cc = ""
MailObj.To = "firstname.lastname@example.org"
MailObj.Subject = "From Web"
MailObj.Body = "Mail from web"
MailObj.BodyFormat = 1
MailObj.MailFormat = 0
MailObj.Importance = 3
MailObj.Bcc = ""
MailObj.Attachfile "C:\path\Picturefile.gif", "Picture", 1
Set MailObj = Nothing
This worked!!! Thanx for all those who helped!!!
<b>Now may I ask if there is way to receive mails too ? Using any of these companonts ?</b>
Thanx once again for the help!
Last edited by Jobin; April 5th, 2004 at 09:04 AM.