Jump to content

Newbe needs help!


taimoortwm

Recommended Posts

Where are you running this code form? localhost?

 

If so then you need to configure PHP to use an SMTP server/mail client in order for emails to be sent. See the following page for configuration options available

http://php.net/manual/en/mail.configuration.php

 

If your SMTP server requires authentication (ie google mail, yahoo, outlook etc) before sending emails then you cannot use PHP's mail function. Instead you need to use a something like PHPMailer or Swiftmailer.

Link to comment
Share on other sites

you need an indication of the value being returned by the mail() function.

 

for the time being, forget about redirecting all over the place. start with something like -

if ($success){
  echo "the mail statement returned a TRUE value";
}
else{
  echo "the mail statement returned a FALSE value";
}

i looked at the hostgator faq concerning php/sendmail and apparently the mail() statement can be used to send email through their mail server, though i wouldn't use their example code, it's just more crap php code that's been posted on the web.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.