Web Toolbar by Wibiya How to Send Email from a PHP Script?
   Home   Help Login Register  
Welcome, Guest. Please login or register.

Login with username, password and session length

Search
Pages: [1]
Print
Topic: How to Send Email from a PHP Script?  (Read 762 times)
0 Members and 1 Guest are viewing this topic.
« on: September 23, 2009, 01:29:34 PM »
Janak
Administrator
Full Member

View Profile
*****
Posts: 160



You can use simple below PHP mail() function to send emails using PHP script:

<?php
$to = "recipient@example.com";
$subject = "Hi!";
$body = "Hi,\n\nHow are you?";
if (mail($to, $subject, $body)) {
  echo("<p>Message successfully sent!</p>");
 } else {
  echo("<p>Message delivery failed...</p>");
 }
?>

Thanks!
Logged

Pages: [1]
Print
Jump to:  

� 2006 VPS forum, VPS hosting forums, VPS discussions, VPS web hosting solutions, issues, providers, virtual web hosting questions, VPS hosting
Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC | Forum style designed by PixelSlot
| Sitemap - XML Sitemap