
Federico Einhorn - 2008-08-31 19:27:10
I am trying to use this class to send smtp mails form my server using a working email account so my script looks like this:
##############################################################################
# Project : ABG_SMTPMail #
# File : ABG_SMTP_test.php #
# V1.0.0 26/03/2006 : Initial #
# V1.1.0 21/05/2006 : Improvements & fit to new classes #
# V1.1.1 21/05/2006 : Minor bug fixes #
# (cy) G. BENABOU / ABG Soft PARIS FRANCE #
# #
# A PHP 4 script to test the ABG_SMTP Classes #
# #
##############################################################################
// Choose (uncomment) the script you want to use (only one at a a time !!)
require ("ABG_SMTP.inc.php"); // Full features
// require ("ABG_SMTP_Lite.inc.php"); // Lightened
/*** Definitions ************************************************************/
$server = "mail.mywebsite.net"; // SMTP server URL
$login = "sales+mywebsite.net"; // Authentification login; blank if not used
$pwd = "mypass"; // Authentification password (if authent.)
$from = "sales@mywebsite.net"; // Sender email address
// List(comma separated) of recipients (ABG_SMTP.inc.php)
// Unique recipient (ABG_SMTP_Lite .inc.php)
$to = "fulltraffic@ipipi.com";
// List(comma separated) of more recipients
// $cc & $bcc used by ABG_SMTP.inc.php only; left for compatibility
$cc = "";
$bcc = "";
$subject = "VENTA";
$body = "Venta $99.95 PP";
/*** Instantiate object and run **********************************************/
$smtp = new ABG_SMTPMail($server);
// Get the result of the transaction and reports
$Result = $smtp->ob_SendMail( $login, $pwd, $from, $to, $cc, $bcc, $subject, $body);
echo ($smtp->ob_Status);
echo ($Result ? "Message sent succesfully!" : "Error sending message \n $smtp->ob_Error");
But for some reason I get this response:
<220-server.mywebsite.net ESMTP Exim 4.69 #1 Sun, 31 Aug 2008 16:19:10 -0300
>HELO : localhost ? 250
<220-We do not authorize the use of this system to transport unsolicited,
Error sending message
*** Error ***
Waiting = 250
Received = 220
Does anyone knows what to do here?
Thank you!!