Re: Need Help with PHP Mails

From: Date: Mon, 04 Apr 2011 13:22:37 +0000
Subject: Re: Need Help with PHP Mails
References: 1 2 3 4 5  Groups: php.db php.windows 
Request: Send a blank email to php-windows+get-30588@lists.php.net to get a copy of this message
2011/4/4 Guru™ <nagendra802000@gmail.com>: > Hi, > > Here is the PHP script I am using to send email to myself. > > <?php > > > $party_name = $HTTP_POST_VARS['party_name']; > $contact_no = $HTTP_POST_VARS['contact_no']; > $email = 'nagendra802000@gmail.com'; > > > mail($email,$party_name,$contact_no); > > ?> > > > > 2011/4/4 Richard Quadling <rquadling@gmail.com> >> >> 2011/4/4 Guru™ <nagendra802000@gmail.com>: >> > Hi Richard, >> > I am using simple PHP mail function but, I am unable to send an email to >> > myself. What I want is when the user click on submit button I should get >> > an >> > email with the form data. >> > >> > >> > >> > 2011/4/4 Richard Quadling <rquadling@gmail.com> >> >> >> >> 2011/4/4 Guru™ <nagendra802000@gmail.com>: >> >> > Hi All, >> >> > >> >> > I have this HTML form >> >> > >> >> > >> >> > <style type="text/css"> >> >> > <!-- >> >> > .style14 {font-size: 24px >> >> > } >> >> > .style14 {font-size: 12px} >> >> > --> >> >> > </style> >> >> > <table width="788" border="0" >> >> > align="center"> >> >> >  <tr> >> >> >    <td width="1023"><form method="post" >> >> > action=""> >> >> >      <table width="648" height="133" >> >> > border="0" align="center" >> >> > cellpadding="0" cellspacing="0" >> >> > bordercolor="#000000"> >> >> >        <tr> >> >> >          <td width="132" height="44" >> >> > valign="middle"><div >> >> > align="right"><strong>Your >> >> > Name</strong></div></td> >> >> >          <td width="491" >> >> > valign="middle"><input name="party_name" >> >> > type="text" size="50" /></td> >> >> >        </tr> >> >> >        <tr> >> >> >          <td valign="middle"><div >> >> > align="right"><strong>Contact >> >> > Numbers</strong></div></td> >> >> >          <td height="38" valign="middle"><p >> >> > align="left"> >> >> >            <input name="contact_nos" type="text" >> >> > size="50" /> >> >> >            <span class="style14">(please specify STD >> >> > code)</span></p></td> >> >> >        </tr> >> >> >        <tr> >> >> >          <td valign="middle"><div >> >> > align="right"><strong>Email</strong><strong> >> >> > </strong></div></td> >> >> >          <td height="33" >> >> > valign="middle"><input name="email" >> >> > type="text" >> >> > size="50" /></td> >> >> >        </tr> >> >> >      </table> >> >> >      <p align="center"> >> >> >        <input type="submit" value="submit" >> >> > name="submit"> >> >> >      </p> >> >> >    </form></td> >> >> >  </tr> >> >> > </table> >> >> > >> >> > >> >> > >> >> > >> >> > >> >> > ____________________________________________________________________________ >> >> > >> >> > What I want is when the user click on the submit button the data from >> >> > this >> >> > form should directly comes to my email. I tried mail function but not >> >> > working for me. I just need these 3 fields in my mail. Please help me >> >> > with >> >> > this. >> >> > >> >> > -- >> >> > *Best, >> >> > * >> >> > *Guru™* >> >> > >> >> >> >> As this is a PHP for Windows mailing list, I assume you actually are >> >> having a problem with PHP on Windows? >> >> >> >> And not your HTML code. >> >> >> >> As you are in a PHP for Windows mailing list, I assume you are on >> >> Windows, which, as you are now experiencing, doesn't have a mail >> >> server built in, nor an app you can run that provides the same >> >> facility. >> >> >> >> See http://uk.php.net/manual/en/book.mail.php for >> >> all the lovely >> >> documentation, especially with the runtime configuration options. >> >> >> >> Most likely, you've not set these appropriately. >> >> >> >> But, in short, you are going to need to tell us what is NOT working >> >> for any realistic help. >> >> >> >> Personally, I use HTMLMimeMail5 (now called RMail) from phpguru.com. >> >> PHPMailer is another tool that does a similar job. It may be better, >> >> I've just never used it. >> >> >> >> Regards, >> >> >> >> Richard. >> >> >> >> P.S. "Guru"? Really? >> >> -- >> >> Richard Quadling >> >> Twitter : EE : Zend >> >> @RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY >> > >> > >> > >> > -- >> > Best, >> > Guru™ >> > >> > >> >> So, just like I said, you haven't setup PHP's mail configuration >> options and/or you don't have a local SMTP server. >> >> Without these being correct, you won't get any email. >> >> >> >> >> -- >> Richard Quadling >> Twitter : EE : Zend >> @RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY > > > > -- > Best, > Guru™ > > That's all well and good. But ... and this is pretty much me repeating myself, what about your mail configuration. Please read http://uk.php.net/manual/en/mail.configuration.php and tell us what you've got set. -- Richard Quadling Twitter : EE : Zend @RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY

« previous php.windows (#30588) next »