PHP to ASP Conversion

Last post 06-18-2009 1:39 AM by qwe123kids. 1 replies.

Sort Posts:

  • PHP to ASP Conversion

    06-17-2009, 8:12 PM
    • Member
      point Member
    • alexjoon
    • Member since 06-17-2009, 11:40 PM
    • Posts 1

    Hi gurus

     

    I am new to ASP and I need to convert the following PHP code to ASP. I did use one of the online converters with no luck.  This script gets the user input for name, Email, phone and comments from another page in order to compose and send an Email to an individual. Any help will be greatly appreciated

     

    <?php
    Header("Location:html/thankyou.html");

    // two recipients
    $to  = 'alex@yahoo.com' . ', '; // note the comma
    $to .= 'steve@yahoo.com';

    // subject
    $subject ='Message from 4eversmile.com: '.$_GET['name'];

    // message
    $message = '
    <html>
    <head>
    <style type="text/css">
    <!--
    .style1 {
     font-family: Verdana, Arial, Helvetica, sans-serif;
     font-size: 12px;
    }
    -->
    </style>
    </head>
    <body>
    <table width="635" height="343" border="0" background="http://www.chatt.com/images/email_header.gif">
      <tr>
        <td width="271" height="80">&nbsp;</td>
        <td width="348" align="center"><span class="style1">This email message has been sent from<br />
          the Quick Contact form on your website.</span></td>
      </tr>
      <tr>
        <td height="219">&nbsp;</td>
        <td valign="top"><BR><BR>
     '.$_GET['message'].'<br><br>
     <br>Thank you,<br><br>
     '.$_GET['name'].'<br>
     '.$_GET['phone'].'<br>
     '.$_GET['email'].' 
     </td>
      </tr>
      <tr>
        <td>&nbsp;</td>
        <td valign="top" align="center"><span class="style1">Email delivery processed by <a href="http://www.chatt.com">Point Click Chatts</a></span></td>
      </tr>
    </table>

     

    <strong>This email was sent from the contact form on your website</strong><br><br>

    </body>
    </html>
    ';

    // To send HTML mail, the Content-type header must be set
    $headers  = 'MIME-Version: 1.0' . "\r\n";
    $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";

    // Additional headers
    $headers .= 'From: Quick Contact <alex@yahoo.com>' . "\r\n";

    // Mail it
    mail($to, $subject, $message, $headers);
    ?>

    Filed under:
  • Re: PHP to ASP Conversion

    06-18-2009, 1:39 AM
    • All-Star
      21,403 point All-Star
    • qwe123kids
    • Member since 03-27-2008, 5:49 AM
    • Posts 3,680

     Hi,

    Seems u want to Send maill..

    http://www.4guysfromrolla.com/articles/072606-1.aspx

    http://www.aspheute.com/english/20000918.asp

    Thanks
    Avinash Tiwari

    Remember to click “Mark as Answer” on the post, if it helps you.

    MY Blog

    Hacking Inside .net exe
Page 1 of 1 (2 items)