Hello, I'm creating a PHP email form, and for this particular server, I have to use SMTP Authentication. They hosting service sent me this link: http://email.about.com/od/emailprogramm ... cation.htm
Anyway, I have the form created, and I created the PHP file called mail.php. I finally got it to where it does send me an email, but the message is completely blank. My form has four fields, which are: name, email, telephone, and message, so these should each be emailed to me when the form is filled out.
Thank you in advance if anyone can look this over.
Here is my PHP code:
Line number On/Off | Expand/Contract <?php require_once "Mail.php"; $from = "Jane Doe <jane.doe@gmail.com>"; $to = "JD <jim.doe@gmail.com>"; $subject = "Request to contact me"; $name = "name:n"; $email = "email:n"; $phone = "phone:n"; $message = "message:n"; $host = "smtp.gmail.com"; $username = "jane.doe"; $password = "blackcat35"; $headers = array ('From' => $from, 'To' => $to, 'Subject' => $subject); $smtp = Mail::factory('smtp', array ('host' => $host, 'auth' => true, 'username' => $username, 'password' => $password)); $mail = $smtp->send($to, $headers, $body); if (PEAR::isError($mail)) { echo("<p>" . $mail->getMessage() . "</p>"); } else { print "<meta http-equiv="refresh" content="0;URL=received.htm">"; } ?>
And here is my HTML form:
Line number On/Off | Expand/Contract <form method="POST" action="mail.php"> <p>Fields marked (*) are required</p><p><strong>Name:* </strong>
<input name="name" type="text" size="40" maxlength="50" id="name" /> <p><strong>Email:* </strong>
<input name="email" type="text" size="40" id="email"><p><strong>Telephone:</strong>
<input name="message" type="text" size="40" maxlength="30" id="message" /> <p><strong>Message:* </strong>
<textarea name="message" cols="40" id="message"></textarea><p><input type="submit" name="submit" value="Submit"> <input type="reset" name="Clear" id="Clear" value="Reset" /> </form>
Mail Script Problems
I have created a PHP mail script. I am having a problem though. In $body i am trying to put two values side by side like so $Fname $Lname. Where ever i use tag the values appear in the final
problem with php server update from mid 2009
Hi,I have this navigation menu on 2 websites which used to work just fine. After a recent update to the php server, the menu stopped working properly. It still loads the pages but the highlighted
Bar charts using Graphical Framework.
I am using Graphical Frameworks(GFW) to create a chart Graphic . There is no problem with the data displayed on the bar graph .The problem is that Y-axis of the chart resizes in function to the
How can I get my program to read a larger array ??
Hi:
Date help - fetch dates for Mondays between xxx and yyy?
Does anyone know the best way to do this? I have two dates, say:2010-01-26 and 2010-05-30and I want to return the dates of all the Mondays between them:2010-02-012010-02-082010-02-15....etc.Thanks
Limiting checkboxes?
Hi guys, I have this code: Code: if(isset($_POST['selected'])) { foreach($_POST['selected'] as $item) { $sql = "SELECT * FROM tablename WHERE ID=$item"; mysql_query($sql) or
issues verifying if user is logged in
I am having issues when a user logs in via asp Login control, the IsAuthenticated still seems to come up false... ( yes the username and password is correct)
Session
I am having a little trouble with a session. Not sure if it is my browser or what. I know I do not have any trouble logging into forums such at these, so not sure why this is not working.first the
Grouping and sorting results
Please help with this query.I have 2 tables in a database, countires and cities. states looks like thiscountriesid -----------country1 ------------uk2 ------------us3 ------------japancitiesid
Please help understand this code
I noticed the index page on my site was modified this morning and found this code inserted at the bottom of the page:Code: <!--ddgbsre_erd_sdd--><?php