Jump to content

TerryR

Members
  • Posts

    10
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

TerryR's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. :) at last! Thanks to all for your help. I did what I should have done to start with, and went to the FAQs on my webserver host, where it says... Use the PHP mail function and set the mail from using the following line of code - replacing email@mydomain with the correct domain name. ini_set("sendmail_from", " email@mydomain "); ...and all is now OK.
  2. Ronald, I think you might just have cracked it for me. This is what I've got: SMTP = localhost smtp_port = 25 ; For Win32 only. ;sendmail_from = me@example.com It feels wrong to have localhost, but I don't know what to have instead. Could you explain a bit more please?
  3. Ken, Here are my answers: 1. I've tried on two hosts, both with many users - does that mean shared? 2. I'm buying site space on one server, but at present trying things out on my college system 3. I don't know 4. My machine is Windows XP 5. n/a 6. Yes, for the site I am buying, but no for my college site 7. 5.1.4 8. Not yet, but I will tomorrow
  4. I take the point about the If statement, and the fifth parameter, so I've now got $fifth = '-f terry654321@hotmail.co.uk'; if(mail($to, $subject, $message, "From: me<terry654321@hotmail.co.uk>\nX-Mailer: PHP/",$fifth)) { echo "posted"; } else { echo "no post"; } ... and it still doesn't work!
  5. I set up a new Hotmail account and tried it, but still no joy. This is the actual code I'm using, though I have tried the other suggestions too. The file is called mailtest3.php. I get the "Your email was sent successfuly" message, but no message arrives. <?php if (isset($_POST['btnSend'])) { $to = $_POST['to']; $subject = $_POST['subject']; $message = $_POST['message'];     if ((!$to) || (!$subject) || (!$message)) {         echo "You did not submit the following required information:\n";         if (!$to) {             echo "Must enter a email address to send the mail\n";                                                }         if (!$subject) {             echo "You must enter a subject\n";         }         if (!message) {             echo "You must enter a message\n";         }         exit;     } else { $to = stripslashes($to); $subject = stripslashes($subject); $message = stripslashes($message); mail($to, $subject, $message, "From: me<terry654321@hotmail.co.uk>\nX-Mailer: PHP/") or die("Unable to send mail"); echo "Your email was sent successfuly"; } } else {echo "btnSend not set";} ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <title>Send mail Script</title> </head> <body> <form action="mailtest3.php" method="post"> <p>To</p> <p><input type="text" name="to" size="40" value = 'terry654321@hotmail.co.uk'></p> <p>Subject</p> <p><input type="text" name="subject" size="40" value = 'xxx' ></p> <p>Message</p> <p><textarea cols="38" rows="10" name="message">time is now <?php time() ?> </textarea></p> <input type="submit" name="btnSend" value="Send"> </form> </body> </html>
  6. Thanks for the suggestion, but I don't have a spam folder set up on the account I'm using. I'm using Outlook Express, and can send emails to myself perfectly well.
  7. Still no progress. It just says the mail has been sent. Maybe it has - but I sure ain't receiving it!
  8. Thanks to all replies, but sorry, I've tried them all and still no luck. What should I look for in phpinfo to see if mailing has been disabled?
  9. Thanks for the quick replies. Here's my simplified test code that still won't work: <?php // The message $message = "Line 1\nLine 2\nLine 3"; // Send $result=mail('terry.richter@virgin.net', 'My Subject', $message); if ($result){     echo "true"; } else echo "False"; ?> The function returns True (= 1), but either the mail is being sent into a black hole in cyberspace, or isn't being sent at all. I'm certainly not receiving anything!
  10. >:( I just want to send emails using the mail() function. It returns True, but doesn't actually send the email! Any ideas please?
×
×
  • 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.