Cannot Send Email via ASP

Discussion in 'Classic ASP' started by joelnet, Mar 7, 2006.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. Ahh, the object you tried using is not installed on our servers. Try this instead...

    http://kb.discountasp.net/article.aspx?id=10078





    <%


    set objMessage = createobject("cdo.message")
    set objConfig = createobject("cdo.configuration")


    ' Setting the SMTP Server
    Set Flds = objConfig.Fields
    Flds.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
    Flds.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "localhost"
    Flds.update



    Set objMessage.Configuration = objConfig
    objMessage.To = "[email protected]"
    objMessage.From = "[email protected]"
    objMessage.Subject = "This is a sample email sent using CDO"
    objMessage.TextBody = "Congratulation" &amp; VbCrLf &amp; "If you receive this is, your mail component works"
    objMessage.fields.update
    objMessage.Send


    Response.write "Mail sent..."

    set objMessage = nothing
    set objConfig = nothing

    %>


    I hope this helps





    Joel Thoms
    DiscountASP.NET
    http://www.DiscountASP.NET
     
  2. Is this the right way to send mail from your hosting?

    Set Mailer = Server.CreateObject("SMTPsvg.Mailer")
    Mailer.ContentType = "text/html"
    Mailer.FromName = fromName
    Mailer.FromAddress= fromAddress
    Mailer.RemoteHost = "localhost"
    Mailer.AddRecipient "",toAddress
    Mailer.Subject = subject
    Mailer.BodyText = bodyText

    if Mailer.SendMail then
    sendMail = 1
    else
    sendMail = 0
    end if
    Set Mailer = nothing

    unfortuntly its not working...

    thanks,
    izik.
     
  3. Are you getting an error message? do you have a url of an example we can look at?


    Joel Thoms
    DiscountASP.NET
    http://www.DiscountASP.NET
     
  4. Server object error 'ASP 0177 : 800401f3'


    Server.CreateObject Failed


    /ndg/include/functions.asp, line 379


    800401f3
    I cannt give u a link, but this is the error i get.
    The server cannot create that object, and i dont know why.

    izik.
     
  5. Bruce

    Bruce DiscountASP.NET Staff

    The component you are trying to use ASPMail has been deprecated.

    The component is causing server crash since we upgraded to Win2k3 sp1

    Bruce

    DiscountASP.NET
    www.DiscountASP.NET
     
Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.

Share This Page