-1

Hi,

If anybody want to test simple email online form, here is a sample:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>Test php mail</title> </head> <body> <?php
                $to = "example@example.com" . ", "; //writing mail to the user
                $subject = "mailer";
                $message = "Hello,testing 123!" ;

                // Additional headers
                $headers .= "From: example@example.com" . "\r\n";
                $headers .= "Reply-To: example@example.com" . "\r\n";
                $headers .= "X-Mailer: PHP/" . phpversion();

                if(mail($to,$subject,$message,$headers))
                {
                    echo "mail sent Successfully";// mail sent Successfully.
                }
                else
                {
                    echo "failed";
                }
      ?> </body> </html> 

Edited by pritaeas: Moved to PHP.

2
Contributors
2
Replies
18
Views
2 Years
Discussion Span
Last Post by javaid97
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.