PDA

Click to See Complete Forum and Search --> : HELP ON ASP CODE FIND BUG!!!


Sacofjoea
Jul 5th, 2000, 02:12 AM
<%
'------------------------- Email ASP Code -----------------------------

Set Mailer = Server.CreateObject("SMTPsvg.Mailer")
Mailer.RemoteHost = "wbsmtp.iland.com" (This is where you put the name of your email server)
Mailer.FromName = Request.form("name")+" " +Request.form("email") (When your email comes to you, this WHO the mail will be from)
Mailer.FromAddress = "ASP Send Mail" ailer.AddRecipient "Amanda", "amanda@virtual-fx.net" (This is where the email will be sent! Name, Email)
Mailer.ReturnReceipt = true
Mailer.Subject = "ASP SEND MAIL @ VIRTUAL-FX" (This will be the subject line of the email)
Mailer.BodyText = "Name : " + Request.form("name") (Calling the variable name of the .swf file into the body of the letter)
Mailer.BodyText = "E-Mail : " + Request.form("email") (Same as above)
Mailer.BodyText = "Comments : " + Request.form("comments") (Same as above)

if not Mailer.SendMail then
Response.Write " Mailing Failed... Error is: <br>"
Response.Write Mailer.Response
else
Response.write "<center><font color=blue>"
end if
%>

This was made to send emial via Flash... I get the error

Server object error 'ASP 0177 : 800401f3'

Server.CreateObject Failed

/tutorials/html/sendmail.asp, line 4

Invalid class string


Whats the error on it?

Mark Sreeves
Jul 5th, 2000, 03:35 AM
Is the dll containing "SMTPsvg.Mailer" registered correctly?

Does the CreateObject work ok in a VB prog?

Jul 5th, 2000, 05:24 AM
Use CDONTS...
oMailer = Server.CreateObject("CDONTS.NewMail")
I find it's easier to use than the other one and is a standard component with IIS so there's more chance of the server having it and it being registered properly. :)