PHP Classes

sasl_client_class

Recommend this page to a friend!

      MIME E-mail message sending  >  MIME E-mail message sending package blog  >  How Can PHP Send Emai...  >  All threads  >  sasl_client_class  >  (Un) Subscribe thread alerts  
Subject:sasl_client_class
Summary:I need validate with this mechanism
Messages:16
Author:Rodrigo Fonseca Borges
Date:2007-01-29 19:34:33
Update:2011-07-31 02:48:48
 
  1 - 10   11 - 16  

  11. Re: sasl_client_class   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2011-07-30 00:25:29 - In reply to message 10 from Kevin Rank
If PHP crashes, there is nothing I can do except for recommending to use a different version.

Anyway, I suspect that PHP is running into a fatal error and crashes. In that case you need to enable the PHP error log and see what error is happening when it exits.

  12. Re: sasl_client_class   Reply   Report abuse  
Picture of Kevin Rank Kevin Rank - 2011-07-30 03:15:43 - In reply to message 11 from Manuel Lemos
I FINALLY JUST STARTED OVER AND IT WORKS. I MUST HAVE HAD SOME ERROR IN MY VARIABLES.

NOW I AM TRYING TO SEND AN HTML MESSAGE USING SMTP_MAIL.PHP

WORKS FINE FOR A TEXT MESSAGE BUT I CAN NOT FIGURE OUT THE HTML PART WITH SMTP.

IS THERE A SIMPLE EXAMPLE I CAN FOLLOW THAT SHOW HOW TO DO THIS

THANKS

  13. Re: sasl_client_class   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2011-07-30 03:47:08 - In reply to message 12 from Kevin Rank
Take a look at the test_simple_html_mail_message.php script. You can just change the included class files in that script to use the smtp_message_class instead of the email_message_class, so it sends via SMTP.

  14. Re: sasl_client_class   Reply   Report abuse  
Picture of Kevin Rank Kevin Rank - 2011-07-30 17:22:35 - In reply to message 13 from Manuel Lemos
Sorry for all the ?? and I really appreciate your help

I am getting closer and I am missing something somewhere

When I do the test email the web page comes up like this

Error: could not open part file http://www.phpclasses.org/graphics/logo.gif array(8) { [0]=> array(6) { ["Content-Type"]=> string(9) "image/gif" ["Content-Transfer-Encoding"]=> string(6) "base64" ["NAME"]=> string(8) "logo.gif" ["DISPOSITION"]=> string(6) "inline" ["FILENAME"]=> string(43) "http://www.phpclasses.org/graphics/logo.gif" ["Content-ID"]=> string(36) "73658b211f674d067500b9ddc31f3d7c.gif" } [1]=> array(6) { ["Content-Type"]=> string(9) "image/gif" ["Content-Transfer-Encoding"]=> string(6) "base64" ["NAME"]=> string(14) "background.gif" ["DISPOSITION"]=> string(6) "inline" ["FILENAME"]=> string(49) "http://www.phpclasses.org/graphics/background.gif" ["Content-ID"]=> string(36) "a7d068f5b1b49073fe6bc773b0969419.gif" } [2]=> array(4) { ["Content-Type"]=> string(9) "text/html" ["Content-Transfer-Encoding"]=> string(16) "quoted-printable" ["CHARSET"]=> string(10) "ISO-8859-1" ["DATA"]=> string(943) "
Testing Manuel Lemos' MIME E-mail composing and sending PHP cla= ss: HTML message

Hello kevin,

This message is just to let you know that the MIME E-= mail message composing and sending PHP class is working as expected.
Here is an image embedded in a message as a separate part:
=
Than= k you,
USERNAME

" } [3]=> array(4) { ["Content-Type"]=> string(10) "text/plain" ["Content-Transfer-Encoding"]=> string(16) "quoted-printable" ["CHARSET"]=> string(10) "ISO-8859-1" ["DATA"]=> string(89) "This is an HTML message. Please use an HTML capable mail program to read this message. " } [4]=> array(3) { ["Content-Type"]=> string(21) "multipart/alternative" ["PARTS"]=> array(2) { [0]=> int(3) [1]=> int(2) } ["BOUNDARY"]=> string(32) "82f4475e732d4998133aa70b8b67c2ab" } [5]=> array(3) { ["Content-Type"]=> string(17) "multipart/related" ["PARTS"]=> array(3) { [0]=> int(4) [1]=> int(0) [2]=> int(1) } ["BOUNDARY"]=> string(32) "24c5c0cdca197a1f55b3e244351918c5" } [6]=> array(5) { ["Content-Type"]=> string(10) "text/plain" ["Content-Transfer-Encoding"]=> string(6) "base64" ["NAME"]=> string(14) "attachment.txt" ["DISPOSITION"]=> string(10) "attachment" ["DATA"]=> string(64) "This is just a plain text attachment file named attachment.txt ." } [7]=> array(3) { ["Content-Type"]=> string(15) "multipart/mixed" ["PARTS"]=> array(2) { [0]=> int(5) [1]=> int(6) } ["BOUNDARY"]=> string(32) "af173e48332f5a3950e692001d82e232" } }

  15. Re: sasl_client_class   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2011-07-30 20:54:52 - In reply to message 14 from Kevin Rank
The example code is using a Web file that no longer exists. Replace the URL http://www.phpclasses.org/graphics/logo.gif by something else like http://files.phpclasses.org/themes/igd01/graphics/elephpant.png .

  16. Re: sasl_client_class   Reply   Report abuse  
Picture of Kevin Rank Kevin Rank - 2011-07-31 02:48:48 - In reply to message 15 from Manuel Lemos
thanks for reply. same thing happens. for some reason it will not go through. I completely redid it and still get same errors. I am no php expert so this may be over my head. I get the plain smtp class to work but when i do the smtp_message class so I can use html it does not seem to work

Here is the beginning of my document that I changed. the rest I left how you wrote. I also added my host, user, password to the smtp.php

I really appreciate your time. I am trying to do on on line registration for our group and then send them a email when they register. I can get plain text to go but then the href links do not work.

<?php
/*
* test_html_mail_message.php
*
* @(#) $Header: /home/mlemos/cvsroot/mimemessage/test_html_mail_message.php,v 1.14 2008/04/07 22:19:08 mlemos Exp $
*
*/

require("email_message.php");
require_once("email_message.php");
require_once("smtp_message.php");
require_once("smtp.php");

/*
* Trying to guess your e-mail address.
* It is better that you change this line to your address explicitly.
* $from_address="me@mydomain.com";
* $from_name="My Name";
*/
$from_address="me@myrealaddress.com";
$from_name="USERNAME";

$reply_name=$from_name;
$reply_address=$from_address;
$reply_address=$from_address;
$error_delivery_name=$from_name;
$error_delivery_address=$from_address;

/*
* Change these lines or else you will be mailing the class author.
*/
$to_name="test";
$to_address="me@myotheraddress.com";

$subject="Testing Manuel Lemos' MIME E-mail composing and sending PHP class: HTML message";
$email_message=new smtp_message_class;
$email_message->SetEncodedEmailHeader("To",$to_address,$to_name);
$email_message->SetEncodedEmailHeader("From",$from_address,$from_name);
$email_message->SetEncodedEmailHeader("Reply-To",$reply_address,$reply_name);
$email_message->SetHeader("Sender",$from_address);

 
  1 - 10   11 - 16