Search This Blog

Showing posts with label mail(). Show all posts
Showing posts with label mail(). Show all posts

Sunday, August 3, 2008

Send mail example using the mail function

Send mail example using the mail function


The mail function in php is built-in unlike a lot of other languages such as ASP and is extremely easy to use. Below is a simple example (copy the below into a file with a php extension such as mailtest.php and upload it to your webspace):

NB: Please ensure you have php setup for your domain, you can do this using your hosting control panel under domain menu > website settings > ticking the php checkbox and clicking save

E-mail Validation with PHP

E-mail Validation with PHPWhen you register on at a website, the site normally checks if the e-mail address that you enter is in a valid format. This is done by using what called a Regular Expression. What we need to do is check if a string (eg $email) matches the regular expression:

content-wide advt