Jump to content

Mailing concepts


tolearn

Recommended Posts

Hi

Im working with a website.

Im using the mail sending option in php.

I tried to send mail to my id but im not getting the mail.  wat may the problem.

 

Code:

 

<table  width="100%" height="100%" border="0">

  <tr>

    <td height="153" align=left valign="top"><table width="831" border="0">

  <tr>

    <td width="768" height="144" align="left"  valign="top" ><font size="+2" face="Arial, Helvetica, sans-serif"><strong> <font color="#FF9900">Welcome to the Online Consultancy Service</font></strong></font>

      <table width="570" align="left" cellpadding="0" cellspacing="0">

        <tr>

        <td width="661" align="left" bgcolor="#FFFFFF">Have your trade or tax related question answered by experts in  the field.</td>

        </tr>

        <!-- for a nominal fee of INR: <'formatnumber(gc_online_consultancy_service_fee, 2)%>-->

        <tr>

          <td align="left" bgcolor="#FFFFFF"> <font color="#FF9900" size="+2" face="Arial, Helvetica, sans-serif"></font> The answer to your question will be emailed to the mail id  provided in the form below.</td>

        </tr>

        <tr>

          <td></td>

        </tr>

        <tr>

          <td align="left" bgcolor="#FFFFFF">If you have any questions about this service, please email us  at <a href="mailto:[email protected]">[email protected]</a> for  details.</td>

        </tr>

      </table>     

      </td>

 

  </tr>

</table>

</td>

  </tr>

 

  <tr>

 

    <td height="451"><table width="98%" height="100%" border="0">

<?php

if(isset($_POST['fd']))

{ ?>

  <tr bordercolor="#990000">

  <td align="left" valign="top">

  <div align="center">

<?

//ob_start();

//$to = '[email protected]';

$to = "[email protected]";

$cust_name=$_REQUEST['txtname'];

$cust_email=$_REQUEST['txtemail'];

$subject=$_REQUEST['txtsubject'];

$Query=$_POST['txtquery'];

//$body="Name: ".$cust_name."\n"."Email: ".$cust_email."\n";

//$body=$body."Query: \n".$_POST['txtquery'];

$body='

<table width="68%" border="1" cellpadding="0" cellspacing="0">

<tr>

<td width="30%"> </td>

<td width="70%"> </td>

</tr>

<tr>

<td>Name</td>

<td>'. $cust_name .'</td>

</tr>

<tr>

<td>Email Id</td>

<td>'. $cust_email . '</td>

</tr>

<tr>

<td>Subject</td>

<td>' . $subject. '</td>

</tr>

<tr>

<td>Query</td>

<td>' .$Query .'</td>

</tr>

</table>';

// 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";

$headers .= 'To:www.agol.in <[email protected]>' . "\r\n";

$headers .= 'From:  <'. $cust_email .'>' . "\r\n";

 

if(mail($to, $subject, $body, $headers))

{

echo "Mail has been sent.";

}

else

{

    echo "Mail Not sent. Try Again.";

}

 

?>

    </div></td>

  </tr> <? } ?>

  <tr>

   

    <td width="86%" align="left" valign="top"><fieldset>

      <legend><strong><font color="#CC0000" size="+1">Online Consultancy</font></strong></legend>

 

      <form id="form1" name="form1" method="post" action="onlineconsultancy.php">

        <table width="514" height="120" border="0">

          <tr>

            <td width="171">Name:</td>

            <td width="327"><input name="txtname" type="text" /></td>

          </tr>

          <tr>

            <td>Email Id:</td>

            <td><input name="txtemail" type="text" /></td>

          </tr>

          <tr>

            <td>Subject:</td>

            <td><input name="txtsubject" type="text" /></td>

          </tr>

          <tr>

            <td valign="top">Query:</td>

            <td><p>

                <textarea name="txtquery" cols="50"  w="w" rows="10"></textarea>

            </p></td>

          </tr>

          <tr>

            <td valign="top"> </td>

            <td> </td>

          </tr>

          <tr>

            <td valign="top"><input name="fd" type="hidden" id="fd" value="fd" /></td>

            <td><input type="submit" name="Submit" value="Submit" /></td>

          </tr>

          <tr></tr>

        </table>

            </form>

      <p>      </p>

<p>                                               </p>

     

       

      <p>  </p>

   

      </fieldset></td>

  </tr>

</table></td>

 

</table>

 

Thank you

Link to comment
https://forums.phpfreaks.com/topic/77718-mailing-concepts/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.