« Previous Next »

Thread: sendmail finnishing

Last post 11-02-2009 12:37 AM by qbernard. 9 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (10 items)

Sort Posts:

  • 11-01-2009, 5:42 PM

    sendmail finnishing

    Hi everyone.

    Happy halloween...

    My sendmail.asp sript is sending mail, hurray!

    Trouble is, I only get pieces of info, Arrgh!

    Emailed end:

    Subject: name
    Type: Text

    And question in the email tex box.

    The sendmail page code:

    your name:
    "name"
    your email:
    "email"
    enter your question
    "question"

    Sendmail.asp script:

    .Subject = "name"
    .TextBody = "question"

    Thank you to everyone for reading this post.

    Sabby

  • 11-01-2009, 5:53 PM In reply to

    Re: sendmail finnishing

    Thank you to:

    qbernard

    tomkmvp

    Nearly finnished apart from the issue above.

    Sabby

     

     

  • 11-01-2009, 8:26 PM In reply to

    Re: sendmail finnishing

    check out this article.  It has example code using cdosys

    http://www.w3schools.com/asp/asp_send_email.asp

    Steve Schofield
    Windows Server MVP - IIS
    http://weblogs.asp.net/steveschofield


    http://www.IISLogs.com
    Log archival solution
    Install, Configure, Forget
  • 11-01-2009, 9:18 PM In reply to

    Re: sendmail finnishing

    Ya. that's the msgs body. just put in your mail content there.

     

    Cheers,
    Bernard Cheah
  • 11-01-2009, 9:33 PM In reply to

    Re: sendmail finnishing

    Mail content!

    What mail content?

    sabby lol

     

  • 11-01-2009, 9:39 PM In reply to

    Re: sendmail finnishing

    That will be your mail body or the content you wish to send out?

    If this is registration email, then you might want to put... 'thank you for registering with xxxx, here is your login account xxxx... please feel free bla bla bla"

     

    Cheers,
    Bernard Cheah
  • 11-01-2009, 9:51 PM In reply to

    Re: sendmail finnishing

    Even though I've been trying to do this sendmail page in various codes for five weeks now, I still have to confess to having no idea what it is your talking about. The confusion is all mine.

    Here is the send mail asp code, please advise followed by the page form code please advise.

    asp


    <%
    sch = "http://schemas.microsoft.com/cdo/configuration/"

    Set cdoConfig = CreateObject("CDO.Configuration")

    With cdoConfig.Fields
    .Item(sch & "sendusing") = 2 ' cdoSendUsingPort
    .Item(sch & "smtpserver") = "intmail"
    .update
    End With

    Set cdoMessage = CreateObject("CDO.Message")

    With cdoMessage
    Set .Configuration = cdoConfig
    .From = "comments@pizzapal.co.uk"
    .To = "comments@pizzapal.co.uk"
    .Subject = ""
    .TextBody = ""
    .Send
    End With

    Set cdoMessage = Nothing
    Set cdoConfig = Nothing
    %>

     sendmail page

    <table width="640" height="400" border="0" align="center">
      <tr>
        <td>
     <html>
    <head>
    <title>emailform</title>
    <style type="text/css">
    <!--
    .style3 {
     color: #000000;
     font-weight: bold;
     font-size: 16px;
    }
    .style4 {font-family: Geneva, Arial, Helvetica, sans-serif}
    .style7 {font-family: Geneva, Arial, Helvetica, sans-serif; font-weight: bold; }
    .style8 {font-size: 16px}
    -->
    </style>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"></head>
    <body>
    <form method="post" action="SendMail.asp">
       <p align="center"><span class="style3"><span class="style4">Complete this form and click the submit-button. </span></span></p>
       <p align="center"><span class="style3"><span class="style4">We will answer your
           questions as soon as possible. </span><br>
        </span><br>
         <span class="style7">Your name </span><br>
         <input name="name" type="text" id="name" size="25">
         <br>  
         <span class="style7"><strong>Your email</strong></span><br>
         <input name="email" type="text" id="email" size="25">
         <br>
         <select name="subject" size="1">
           <option value="help">contact
           <option value="tips">buying
           <option value="other">selling
         </select>
         <br>
         <span class="style7">Enter your question </span><br>
         <textarea name="question" cols="40" rows="15"   Wrap="PHYSICAL" id="question"></textarea>
         <br>
         <input type="submit" class="style7" value="  Submit ">
      </p>
    </form>
    </body>
    </html>
     &nbsp;</td>
      </tr>
    </table>

    thank you

     sabby

     

  • 11-01-2009, 10:20 PM In reply to

    Re: sendmail finnishing

    OoOO... I'm suggesting you do more reading, so you got a form to capture user input, what you need to do next is to send the captured input out. so you have a form.asp and post it to send mail.asp which like what you have above, except now, you need to replace the mail body or content with the input user entered.

    Something like
    .Subject = request.form("subject")
    .TextBody = "Name: " & request.form("name") & vbCrLf & "Email: " & request.form("email") & vbCrLf &   "Question: " & request.form("question")

    Google for more reading.

     

    Cheers,
    Bernard Cheah
  • 11-01-2009, 10:37 PM In reply to

    Re: sendmail finnishing

    I agreewith you, more reading...

    Tahnk you for taking this time to help and advise.

    I think  will set up a virtual server on my computer and run a tutorial from a bible.

    It will provide a record set to over come my inexperince in asp.script and enable a greater authoring flexabilty.

    Sabby happy halloween 

  • 11-02-2009, 12:37 AM In reply to

    Re: sendmail finnishing

    Yes, always good to do more reading and testing before putting anything on the net.

     

    Cheers,
    Bernard Cheah
Page 1 of 1 (10 items)
Microsoft Communities