1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

mail problem

Discussion in 'C#' started by OPETH, Oct 19, 2006.

  1. #1
    These my asp codes.

    <%
    'Sends an email
    Dim mail
    Set mail = Server.CreateObject("CDO.Message")
    mail.To = Request.Form("To")
    mail.From = Request.Form("From")
    mail.Subject = Request.Form("Subject")
    mail.TextBody = Request.Form("Body")
    mail.Send()
    Response.Write("Mail Sent!")

    Destroy the mail object!
    Set mail = nothing
    %>

    This my html form

    <form method="POST" action="asa.asp">
    To <input type="text" name="To"/> <br />
    From <input type="text" name="From"/> <br />
    Subject <input type="text" name="Subject"/> <br />
    Body <textarea name="Body" rows="5" cols="20" wrap="physical" >
    </textarea>
    <input type="submit" />
    </form>

    I added to my own hosting ,asp codes and html form.But just dont work.I would like to users send me mails by this method.How can I do this?
     
    OPETH, Oct 19, 2006 IP
  2. Free Born John

    Free Born John Guest

    Messages:
    111
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #2
    first question is, do you have the iis mail server running?

    if so then look in the inetpub/badmail directory to see if your messages have ended up there. If so they should have error codes to tell you what's wrong
     
    Free Born John, Oct 19, 2006 IP
  3. ludwig

    ludwig Notable Member

    Messages:
    2,253
    Likes Received:
    66
    Best Answers:
    0
    Trophy Points:
    225
    #3
    ludwig, Oct 20, 2006 IP
  4. accel

    accel Well-Known Member

    Messages:
    142
    Likes Received:
    5
    Best Answers:
    1
    Trophy Points:
    133
    #4
    Check with your host over what code you can use in creating the e-mail, one alternative is:

    Dim mail
    Set mail = Server.CreateObject("CDONTS.NewMail")
     
    accel, Oct 20, 2006 IP
  5. Froggie

    Froggie Well-Known Member

    Messages:
    665
    Likes Received:
    28
    Best Answers:
    0
    Trophy Points:
    120
    #5
    what error are u getting?
     
    Froggie, Oct 21, 2006 IP
  6. Mystique

    Mystique Well-Known Member

    Messages:
    2,579
    Likes Received:
    94
    Best Answers:
    2
    Trophy Points:
    195
    #6
    The question here is, does you hosting service provide Cdonts, Aspmail or any other email component?

    Most ASP servers have not installed these components to prevent spamming, unless the client request them if you are on a paid service.
     
    Mystique, Oct 21, 2006 IP
  7. Software_outsourcing

    Software_outsourcing Peon

    Messages:
    298
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Check with ur hosting company , the mail component they are using . U have to use that component only to send the mail
     
    Software_outsourcing, Oct 22, 2006 IP