Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $to = "Ramona Recipient ";
- $subject = "Hi!";
- $body = "Hi,nnHow are you?";
- $host = "ssl://smtp.gmail.com";
- $port = "465";
- $username = "test";
- $password = "test";
- $headers = array ('From' => $from,
- 'To' => $to,
- 'Subject' => $subject);
- $smtp = Mail::factory('smtp',
- array ('host' => $host,
- 'port' => $port,
- 'auth' => true,
- 'username' => $username,
- 'password' => $password));
- $mail = $smtp->send($to, $headers, $body);
- if (PEAR::isError($mail)) {
- echo("
- " . $mail->getMessage() . "
- "); } else { echo("
- Message successfully sent!
- "); }
- include('index.html');
- ?>
- <form>
- <div class="form-group">
- <input type="text" name="mail" class="form-control" placeholder="Email Address">
- </div>
- <div class="form-group">
- <input type="text" name="subject" class="form-control" placeholder="Subject">
- </div>
- <div class="form-group">
- <textarea class="form-control" name="text" rows="3" placeholder="Your Message"></textarea>
- <button class="btn btn-default" type="submit" >Send Message</button>
- </div>
- </form>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement