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.

mailing from ASP

Discussion in 'C#' started by gilgalbiblewheel, Jul 22, 2005.

  1. #1
    I would like to know how to mail from Active Server Pages. I found this site:

    http://www.frii.com/support/knowledgebase/viewArticle.php?articleID=677

    I get:
    How is that dealt with?
    But you may have better suggestions of other emailing systems.SEMrush
     
    gilgalbiblewheel, Jul 22, 2005 IP
    SEMrush
  2. vectorgraphx

    vectorgraphx Guest

    Messages:
    545
    Likes Received:
    16
    Best Answers:
    0
    Trophy Points:
    0
    #2
    your server needs to have CDONTS installed on it for the above example to work, it's not installed by default. make sure that this feature is running.

    VG

    p.s. as far as suggestions, there are several out there, but you need to know what components your server has installed for any of them to work. I use ASPEMAIL, but that's something my host has installed.
     
    vectorgraphx, Jul 22, 2005 IP
  3. gilgalbiblewheel

    gilgalbiblewheel Well-Known Member

    Messages:
    435
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    101
    #3
    How can I do that? Is there a step by step guide?

    I also wonder how then am I going to retrieve the asp email?

    I'm totally new to this. But I think it's about time to know and use it.
     
    gilgalbiblewheel, Jul 22, 2005 IP
  4. vectorgraphx

    vectorgraphx Guest

    Messages:
    545
    Likes Received:
    16
    Best Answers:
    0
    Trophy Points:
    0
    #4
    I'd start by asking your host if CDONTS is enabled. it appears from your code example that it isn't. once you verify that it is or is not working, then you can proceed on to the next step - debugging your code. without your actual code it's hard to say what's happening, however.

    As far as retreiving the asp email, that's the easy part. it'll come to your inbox if set up properly.

    VG
     
    vectorgraphx, Jul 25, 2005 IP
  5. iShopHQ

    iShopHQ Peon

    Messages:
    644
    Likes Received:
    33
    Best Answers:
    0
    Trophy Points:
    0
    #5
    CDO is the mailer object for IIS 6

    CDONTs is the mailer for IIS5

    If you are trying to vreate a CDO object on IIS5, it won't work.

    Also, SMTP has to be installed on the server, but most web servers install that so people can email from ASP. Here's a script taht accepts inputs from a form and mails them out for IIS6. I do my form validation here, shich isn't the best way to do it, but I was too lazy to do javascript valifation on the form page. This will NOT work with Windows 2000 and IIS5-

    <%
    dim fEmail, fBody, fname, strError
    
    fEmail = Request.form("email")
    fBody  = Request.form("body")
    fName = Request.form("name")
    strError = ""
    
    If fEmail = "" Then strError = "Please enter an email address.<br>"
    if Instr(fEmail,"@") = 0 then strError = strError & "That email address doesn't apppear to be valid.<br>"
    
    If fBody = "" Then strError = strError & "It doesn't appear as though you entered a message!<br><br>"
    
    If fName = "" Then strError = strError & "Please enter a name!<br><br>"
    
    If strError = "" then
    Set myMail=CreateObject("CDO.Message")
    myMail.Subject="Email From Webform"
    myMail.From=fEmail
    myMail.To="email-to-mail-to"
    myMail.HTMLBody = "From: "&fName&"<br><br>"&fBody 
    myMail.Send
    set myMail=nothing
    
    response.redirect("thanks.asp")
    End If
    
    End If
    %>
    Code (asp):
    As for retreiving - no such thing. It shows up inthe mailbox of whomever you send it too just like a regular mail.
     
    iShopHQ, Jul 25, 2005 IP
  6. sji2671

    sji2671 Self Made Mind

    Messages:
    1,992
    Likes Received:
    144
    Best Answers:
    0
    Trophy Points:
    170
    #6
    Most decent hosts should also be able to provide a free mail2email script that works with their installed components.
     
    sji2671, Jul 25, 2005 IP