Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- print "1";
- require("smtp.php");
- require("sasl.php"); //SASL authentication
- $from="support@yourwebsite.com";
- $smtp=new smtp_class;
- $smtp->host_name="smtp.gmail.com"; // Or IP address
- $smtp->host_port=465;
- $smtp->ssl=0;
- $smtp->start_tls=1;
- $smtp->localhost="localhost";
- $smtp->direct_delivery=0;
- $smtp->timeout=10;
- $smtp->data_timeout=0;
- $smtp->debug=1;
- $smtp->html_debug=1;
- $smtp->pop3_auth_host="";
- $smtp->user="john@gmail.com"; // SMTP Username
- $smtp->realm="";
- $smtp->password="House22"; // SMTP Password
- $smtp->workstation="";
- $smtp->authentication_mechanism="";
- print "3";
- if($smtp->SendMessage(
- $from,
- array(
- $to
- ),
- array(
- "From: $from",
- "To: $to",
- "Subject: $subject",
- "Date: ".strftime("%a, %d %b %Y %H:%M:%S %Z")
- ),
- "$message"))
- {
- print "Message sent to $to OK.";
- }
- else
- print "Cound not seend the message to $to.nError: ".$smtp->error;
- print "4";
- ?>
- ==============================
- <?php
- $to="ralph@website.com";
- $fn="First Name";
- $ln="Last Name";
- $name=$fn.' '.$ln;
- $from="test@grove.net";
- $subject = "Welcome to Website";
- $message = "Dear $name,
- Your Welcome Message.
- Thanks
- www.website.com
- ";
- include('smtpwork.php');
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement