Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- require_once 'Net/SMTP.php'; //YOU MAY HAVE PROBLEMS HERE, IT DEPENDS WHERE SMTP.php IS STORED ON YOUR PC
- //CHANGE THIS SHITE
- $email_server = "ssl://smtp.gmail.com";
- $email_server_port = "465";
- $email_local_server = "sbarber-web.homelinux.com";
- $email_username = "s.jeff.barber@googlemail.com";
- $email_password = "PASSWORD";
- $email_from = "7 Sound";
- $email_to = "EMAIL ADDRESS TO SEND EMAIL TO";
- $email_subject = "Activate your account";
- $email_message = "MESSAGE";
- if (! ($smtp = new Net_SMTP($email_server, $email_server_port, $email_local_server))) {
- die("Unable to instantiate Net_SMTP object\n");
- }
- #$smtp->setDebug(true);
- if (PEAR::isError($e = $smtp->connect())) {
- die($e->getMessage() . "\n");
- }
- if (PEAR::isError($e = $smtp->auth($email_username, $email_password))) {
- }
- if (PEAR::isError($smtp->mailFrom($email_from))) {
- die("Unable to set sender to <" . $email_from . ">\n");
- }
- if (PEAR::isError($res = $smtp->rcptTo($email_to))) {
- die('Unable to add recipient <' . $email_to . '>: ' .
- $res->getMessage() . "\n");
- }
- if (PEAR::isError($smtp->data( "To: " . $email_to . "\r\n" .
- "From: " . $email_from . "\r\n" .
- "Subject: " . $email_subject . "\r\n" .
- "MIME-Version: 1.0\n" . $email_message))) {
- die("Unable to send data\n");
- }
- $smtp->disconnect();
- //REDIRECT
- echo "<script>document.location='index.php?tab=5'</script>";
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement