SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Thread: sending mail?

  1. #1
    SitePoint Member
    Join Date
    Mar 2002
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question sending mail?

    i just want to get this simple asp script to work....

    <%
    Set Mail=Server.CreateObject(“CDONTS.NewMail”);
    Mail.To=”chris@dsiamic.com”;
    Mail.From=”testing-my@SP-Script.com”;
    Mail.Subject=”Just testing my script”;
    Mail.Body=”Hey! I am sending this email through an ASP Page and guess what? I haven’t learnt much yet, but know that ASP is very powerful.”;
    Mail.SendSet Mail=nothing;
    Response.Write("should have worked");
    %>

    thats all.... if i can actually get the mails sending out on my IIS server i should be happy to integrate querystrings with a flash based form.

    Chris
    Last edited by offdahook; Mar 25, 2002 at 06:47.

  2. #2
    SitePoint Enthusiast PeteWJ's Avatar
    Join Date
    Oct 2001
    Location
    UK
    Posts
    75
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What error are you getting from this script? I can't see anything wrong with it other than the line "Mail.SendSet Mail=nothing;" which I am assuming is a typo here in the forum. However, you don't need any semi-colons at the ends of the lines - perhaps that is screwing up?

    Or it could be that you do not have something set up correctly in IIS.

    Taking a look at DHTMLgods 'How to use CDONTS' thread might be a good idea - http://www.sitepointforums.com/showt...threadid=33093 - as it has lots of good info on sending e-mails generally.

    If you can't find any solution, post back with some more info and I'm sure someone will be able to help you out

    Pete
    Last edited by PeteWJ; Mar 25, 2002 at 15:43.

  3. #3
    + platinum's Avatar
    Join Date
    Jun 2001
    Location
    Adelaide, Australia
    Posts
    6,441
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This has worked for me in the past:
    [VBS]
    <%@ language=VBScript%>
    <%
    Set objMail = Server.CreateObject("CDONTS.NewMail")
    objMail.From "from@domain.com"
    objMail.To "to@domain.com"
    objMail.Subject "Hey"
    objMail.Body "This should work"
    objMail.send
    set objMail = nothing
    %>
    [/VBS]

  4. #4
    SitePoint Addict
    Join Date
    Aug 2000
    Posts
    248
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I believe that you will find the answer here since you are using the exact same script:

    http://www.sitepointforums.com/showt...threadid=53393


    HTH
    Last edited by alexming; Mar 25, 2002 at 07:37.


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
  •