email can not send (error '8004020f')

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • phuc2583
    New Member
    • Dec 2007
    • 18

    email can not send (error '8004020f')

    I will try my best to send email(abc@nhatr anglive,support @nhatranglive), but i can not sent it
    i will try again another email address(phuc258 3@gmail,phuc258 3@yahoo.com), so it sent well,
    This is my code to write to send email:
    Senderfirstname =Request.Form(" firstname")
    SenderlastName= Request.Form("l astname")
    SenderEmail=Req uest.Form("emai l")
    SenderPhone=Req uest.Form("phon e")
    Sendercbxsubjec t=Request.Form( "cbxsubject ")
    Sendertxtsubjec t=Request.Form( "txtsubject ")
    Sendernote=Requ est.Form("note" )

    MailTo = "abc@nhatrangli ve.com,support@ nhatranglive.co m"
    Information = "Informatio n about guest - "
    show= "Informatio n about guest" & VbCrLf & VbCrLf
    show= show& "1. Information about guest:" & VbCrLf
    show= show& "First: " & Senderfirstname & VbCrLf
    show= show& "Last Name: " & SenderlastName & VbCrLf
    show= show& "Email: " & SenderEmail & VbCrLf
    show= show& "Phone: " & SenderPhone & VbCrLf
    show= show& "Subject: " & Sendercbxsubjec t & VbCrLf
    show= show& "Subject Name: " & Sendertxtsubjec t & VbCrLf
    show= show& "2. comment:" & VbCrLf
    show= show& "Comment: " & Sendernote & VbCrLf
    DIM oMail, Flds, oMailConfig
    Set oMail = Server.CreateOb ject("CDO.Messa ge")
    Set oMailConfig = CreateObject("C DO.Configuratio n")
    oMailConfig.Fie lds("http://schemas.microso ft.com/cdo/configuration/smtpserver") = "localhost"
    oMailConfig.Fie lds("http://schemas.microso ft.com/cdo/configuration/smtpserverport" ) = 25
    oMailConfig.Fie lds("http://schemas.microso ft.com/cdo/configuration/sendusing") = 2
    oMailConfig.Fie lds("http://schemas.microso ft.com/cdo/configuration/smtpconnectiont imeout") = 60
    oMailConfig.Fie lds.Update
    Set oMail.Configura tion = oMailConfig
    oMail.From = SenderEmail
    oMail.To = MailTo

    oMail.Subject= Information
    oMail.TextBody = show
    oMail.Send
    Set oMail = Nothing
    Set oMailConfig = Nothing


    please help me to do that
  • idsanjeev
    New Member
    • Oct 2007
    • 241

    #2
    Hi friends
    Which means that the e-mail was rejected by the server for some reason. Here are some things you can try to alleviate the problem
    (error '8004020f')

    Comment

    Working...