0

I am trying to add a feature into my webform that allows users to recieve text messages that confirm their web form submission... and I am kind of lost in doing so... Can someone guide me... I wasn't sucessful with google for the heads up....

4
Contributors
7
Replies
8
Views
5 Years
Discussion Span
Last Post by diafol
1

You can perform a redirect to a "success.php" page or turn to an error page. You can do this with header():

$to      = 'nobody@example.com';
$subject = 'the subject';
$message = 'hello';
$headers = 'From: webmaster@example.com' . "\r\n" .
    'Reply-To: webmaster@example.com' . "\r\n" .
    'X-Mailer: PHP/' . phpversion();

if(mail($to, $subject, $message, $headers)) # TRUE
{
    header('Location: success.php');
}
else                                        # FALSE
{
    header('Location: error.php');
}

http://php.net/manual/en/function.header.php

For better help post your code. Bye.

0

Can you explain to me how this works? How does this send the text? And thanks for the link :)

0

ok... so what if i have (for example) gmail? will that work?

0

hmm... I may have it SMTP working... can you go over the installation of it, I mean I could use my form to send emails to me and the user but that probably doesn't have to do with what SMTP does...

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.