Login   Register  
PHP Classes
elePHPant
Icontem

Well done

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us

      MIME E-mail message sending  >  MIME E-mail message sending package blog  >  Fast PHP Mass Mailer ...  >  All threads  >  Well done  >  (Un) Subscribe thread alerts  
Subject:Well done
Summary:It is a great how you explained it all
Messages:6
Author:dan
Date:2013-10-24 13:32:21
Update:2013-10-28 01:26:47
 

  1. Well done   Reply   Report abuse  
Picture of dan
dan
2013-10-24 19:16:08
Thank you for you explanation. It was perfect!!!

  2. Re: Well done   Reply   Report abuse  
Picture of dan
dan
2013-10-24 19:16:27
Yes i am getting this error when I did the code:
it was added a part without Content-Type: defined
Do you have any ides why that would be?

  3. Re: Well done   Reply   Report abuse  
Picture of Manuel Lemos
Manuel Lemos
2013-10-24 22:15:06 - In reply to message 2 from dan
What exactly is the code that causes that error message? Please paste here the whole script that you tried.

  4. Re: Well done   Reply   Report abuse  
Picture of dan
dan
2013-10-24 22:47:57 - In reply to message 3 from Manuel Lemos
<?php
require('post/email_message.php');
require('post/sendmail_message.php');
$message=new sendmail_message_class;
$message->SetBulkMail(true);
$message->SetEncodedHeader('Subject', 'Some subject');

/*
* Define the recipients list
*/
$to=array(
array(
"address"=>"dan@something.com",
"name"=>"Peter Gabriel"
),
array(
"address"=>"dan@somthing.info",
"name"=>"Paul Simon"
),
array(
"address"=>"dan@something.org",
"name"=>"Mary Chain"
)
);





/**/





/*
* Create a place holder text message body part
*/
$text = 'Hello, some text message';
$message->CreateQuotedPrintableTextPart($text, '',$text_part);

/*
* Create a place holder HTML message body part
*/
$html = 'Hello, some HTML message';
$message->CreateQuotedPrintableHtmlPart($html, '', $html_part);

/*
* Assemble the text and HTML parts as alternatives
*/
$alternative_parts = array($text_part, $html);
$message->AddAlternativeMultipart($alternative_parts);

/*
* Cache the message for all recipients
*/
$message->cache_body = true;

/*
* Iterate for each recipient.
*/
foreach($to as $recipient)
{

/* Personalize the recipient address. */
$message->SetEncodedEmailHeader('To',
$recipient['address'], $recipient['name']);

/* Send the message checking for eventually acumulated errors */
$error=$message->Send();
if(strlen($error))
echo $error . '<br>';
}

?>

  5. Re: Well done   Reply   Report abuse  
Picture of Manuel Lemos
Manuel Lemos
2013-10-26 12:50:56 - In reply to message 4 from dan
The $alternative_parts array definition was incorrect. It should include a $html_part element instead of $html. It should be like this. I have updated the article.

$alternative_parts = array($text_part, $html_part);

  6. Re: Well done   Reply   Report abuse  
Picture of dan
dan
2013-10-28 01:26:47 - In reply to message 5 from Manuel Lemos
Thank you.
I am no longer getting the above error.