473,834 Members | 1,930 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

ASP - Error send mail 'Invalid class string'

1 New Member
1- The code snippet in my post #61 adds the date automatically

2- When filling in the mail body text, I would put all the data into a separate string variable, and then send this to the mail body text:
Expand|Select|Wrap|Line Numbers
  1. dim myBody
  2. for each x in request.form
  3.    myBody = myBody & x & ": " & request.form(x) & vbNewLine
  4. next
  5. Mail.BodyText   = myBody
the rest of your code should work just fine.

Jared
sorry to but in unannounced, I am a newbie to this forum, thank you all for the enormous help this forum has already been and I am sure will continue to be.....

my question relates to send emails from a VBscript in asp.net. I have tried using the cod above and get the following error message:

Error Type:
Server object, ASP 0177 (0x800401F3)
Invalid class string
/leadqualifiers. co.uk/httpdocs/appshandlingBU. asp, line 185

line 185 is
185 [code]et Mail = Server.CreateOb ject("SMTPsvg.M ailer")[code]

does this variable require particular email component on the server ? or is my problem different ?

any ideas ?
Jul 23 '08 #1
2 2382
DrBunchman
979 Recognized Expert Contributor
Hi sandh2008,

Welcome to Bytes.com! I hope you find the site useful. I've split your question into a new thread to save use from scrolling through 60 posts to get to it as that other thread was pretty long! :-)

I believe you are correct: you are missing the required dll to use this mail object. To try to fix this you could use CDOSYS instead by swapping the line above with this one:
Expand|Select|Wrap|Line Numbers
  1.  
  2. Set Mail = Server.CreateObject("CDO.Message")
  3.  
I'm not familiar with the syntax of the mail object you are using so don't know if there's any difference but the basic properties of CDOSYS are these:
Expand|Select|Wrap|Line Numbers
  1.  
  2. Mail.Subject = "Subject"
  3. Mail.From = "Me!"
  4. Mail.To = "You!"
  5. Mail.TextBody = "Hello World!
  6. Mail.AddAttachment "MyPicture.jpg"
  7. Mail.Send
  8.  
And there's plenty more info in the www.

Let me know if this fixes your problem.

Dr B
Jul 23 '08 #2
Jerry Winston
145 Recognized Expert New Member
CDOSYS works pretty well for me using these settings:

Expand|Select|Wrap|Line Numbers
  1.  
  2. Set myMail=Server.CreateObject("CDO.Message")              
  3. dim bodyText
  4. myMail.From = "myEmail@mysite.com"
  5. myMail.Subject = "My Subject Line"
  6. myMail.To = "yourEmail@yourSite.com"
  7. myMail.BCC = "secretGuy@secretSite.com"
  8.  
  9.  

Expand|Select|Wrap|Line Numbers
  1.       myMail.HTMLBody=bodyText  
  2.  
  3. myMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 
  4.  
  5. myMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "127.0.0.1" 
  6.  
  7. myMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverpickupdirectory") = "C:\Inetpub\mailroot\Drop"  
  8.  
  9. myMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25  
  10.  
  11. myMail.Configuration.Fields.Update        
  12. myMail.Send       
  13. set myMail=nothing
  14.  
Jul 25 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

3
1639
by: Nader | last post by:
Hello all, Any help would be greatly appreciated. In a Web-based application (server is local) I am trying to send an email from the server side by The error occurs at the following line while trying to send an email from the server: SmtpMail.Send(msgMail);
8
1128
by: VB Programmer | last post by:
I am trying to send a simple email through my ASP.NET website. This is how I do it. Try System.Web.Mail.SmtpMail.Send("someone@somewhere.com", "me@somewhere.com", "test", "TESTING 123") Catch ex As Exception Response.Write(ex.ToString) End Try Exit Sub
6
1679
by: Alixx Skevington | last post by:
OK why does the following code work in a Windows form with a crystal report viewer but not in a webform. I get the usual CrystalReports.EngineLogONException logon Failed when this is called in aspx. Any help will be very much apprecaited Alixx This is the code in the calling aspx Page
16
2978
by: | last post by:
Hi all, I have a website running on beta 2.0 on server 2003 web sp1 and I keep getting the following error:- Error In: http://www.mywebsite.org/WebResource.axd?d=5WvLfhnJp5Lc8WhQSD4gdA2&t=632614619884218750 -------------------------------------------------------------------------------- System.Security.Cryptography.CryptographicException: Padding is invalid and cannot be removed. at...
3
4562
by: Gerard | last post by:
Hello I have created a windows service to monitor a database, it starts some checks when a timer elapses. The checks send emails depending on their findings. My issue is that when I created a windows application it worked fine, however I need to use a service as I don't want to rely on a user being logged in. The errors I get are: Index #:System.Web.HttpException: Could not access 'CDO.Message' object. --->...
2
17499
by: clevrmnkey | last post by:
I've had nothing but trouble from the System.Net.Mail objects, but I finally need to make them work, and I can't for the life of me see what I'm doing wrong. I pared back my mail transaction to the bare minimum: System.Net.Mail.SmtpClient smtp = new System.Net.Mail.SmtpClient("<my mail server IP>", 25); smtp.Send("<one of my email addresses>", "<another of my email addresses>", "Hello", "World");
2
12177
by: =?Utf-8?B?QWRl?= | last post by:
HI All, I am encountering the following error when I try to send an email through a SMTP server. I believe the problem lies with the authentication part when the network crednetials are used, error is thrown at the .send point. Error is: The following error occured Sending an email: System.ApplicationException: An error occurred sending an email To helen@HerMail.com From ade@MyMail.com Cc Subject A test with Finlistener #1. The body...
6
26396
by: Dave Kelly | last post by:
Sorry for the long post, it is easier to discard information than to have to wait for it to arrive. So here goes: This code worked perfectly when I was an Earthlink customer. Sprint decided not to pardner with Earthlink and create their own IP. Since then everything email has been broke. Sprint/Embarq is the only copper wire DSL provider where I live.
2
2074
by: upendrajpr | last post by:
Dear friends I am sending mail from my site but it gives me some error "Warning: mail() : "sendmail_from" not set in php.ini or custom "From:" header missing in C:\P............." my code is this
0
9799
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9646
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10793
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10510
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10219
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6954
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5627
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4427
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3978
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.