SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Hybrid View

  1. #1
    SitePoint Member
    Join Date
    Jan 2014
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    ASP Contact Form

    Hi im doing a ASP contact form and for some reason i keep getting this.

    Server object error 'ASP 0177 : 800401f3'

    Server.CreateObject Failed

    /confirmation.asp, line 10

    800401f3

    I think that theres something wrong with my STMP, please any help would be greatful.

    Code ASP:
    <%
    DIM strEmail, strFirstName, strLastName, strSubject, strComments
    strEmail = request.form("Email")
    strFirstName = request.form("FirstName")
    strLastName = request.form("LastName")
    strSubject = request.form("Subject")
    strComments = request.form("Comments")
     
    DIM Mailer,strMsgHeader, qryItem, strMsgInfo
    Set Mailer = Server.CreateObject("smtpout.secureserver.net")      // this line might be wrong.
    Mailer.FromName = "Web Designs"
    Mailer.FromAddress= "carlos@example.net"
    Mailer.ReplyTo = strEmail
    Mailer.RemoteHost = "mail.example.net"
    Mailer.AddRecipient "", ""
    Mailer.Subject = "Online Inquiry"
    strMsgHeader = "This mail message was sent from the www.webdesigns.com Online Form" & vbCrLf & vbCrLf
    Mailer.BodyText = strMsgHeader & vbCrLf & "Email: " & Request.Form("Email") & _
    vbCrLf & "First Name: " & Request.Form("FirstName") & _
    vbCrLf & "Last Name: " & Request.Form("LastName") & _
    vbCrLf & "Subject: " & Request.Form("Subject") & _
    vbCrLf & "Comments: " & Request.Form("Comments")
     
    IF Mailer.SendMail THEN
    Response.Write strFirstName & ",<br>"
    Response.Write "Your message has been successfully sent."
    ELSE
    Response.Write "The following error occurred while sending your message: " & Mailer.Response
    END IF
    %>
    Last edited by Mittineague; Jan 15, 2014 at 17:36. Reason: reformatting bbcode tags

  2. #2
    SitePoint Zealot
    Join Date
    Sep 2010
    Posts
    131
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If you are going to send this MailMessage you need smtpClient from your email provider.

    Code:
    Try
                Dim message As New MailMessage()
                Dim fromAdd As MailAddress = New MailAddress("sendfrom@email.com")
                With Mailer
                    .[To].Add("sendto@email.com")
                    .Subject = "Choose Session Members"
                    .From = fromAdd
                    .IsBodyHtml = True
                    .Priority = MailPriority.Normal
                    .BodyEncoding = Encoding.Default
                    .Body = ""
                 End With
                Dim host = Request.Url.Host
                Dim smtpClient As New SmtpClient("smtp.email.com", "25")
                With smtpClient
                    .EnableSsl = True
                    .UseDefaultCredentials = False
                    .Credentials = New System.Net.NetworkCredential("name@email.com", "password")
                    .DeliveryMethod = SmtpDeliveryMethod.Network
                    .Send(message)
                    .Dispose()
                End With
            Catch ex As Exception
                Throw ex
            End Try

  3. #3
    SitePoint Zealot
    Join Date
    Sep 2010
    Posts
    131
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Next time write your own post do not add to others!

    Code:
    try {
    	MailMessage message = new MailMessage();
    	MailAddress fromAdd = new MailAddress("sendfrom@email.com");
    	var _with1 = Mailer;
    	_with1.To.Add("sendto@email.com");
    	_with1.Subject = "Choose Session Members";
    	_with1.From = fromAdd;
    	_with1.IsBodyHtml = true;
    	_with1.Priority = MailPriority.Normal;
    	_with1.BodyEncoding = Encoding.Default;
    	_with1.Body = "";
    	dynamic host = Request.Url.Host;
    	SmtpClient smtpClient = new SmtpClient("smtp.email.com", "25");
    	var _with2 = smtpClient;
    	_with2.EnableSsl = true;
    	_with2.UseDefaultCredentials = false;
    	_with2.Credentials = new System.Net.NetworkCredential("name@email.com", "password");
    	_with2.DeliveryMethod = SmtpDeliveryMethod.Network;
    	_with2.Send(message);
    	_with2.Dispose();
    } catch (Exception ex) {
    	throw ex;
    }

  4. #4
    SitePoint Member
    Join Date
    Jun 2014
    Location
    chicago
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    your getting this error " ASP 0177 : 800401f3" because the WebClass Runtime file (Mswcrun.dll) does not exist on your Web server, or WebClass Runtime is not registered. WebClass Runtime is one of the system files required for your
    WebClass applications to function properly.


Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •