Jump to content


Corporate Sponsors


Latest News: (loading..)

- - - - -

AutoEmailer


197 replies to this topic

#81 mr_absinthe

  • Community Member
  • 411 posts
  • Real Name:Alex
  • Location:London, UK

Posted 11 January 2006, 14:01

Ok I uderstand. It's never nice to be in a position to report a problem and as you said it looks like it's all server specific.

It seems that there might be one more problem with auto_announce now. It those Happy Birthday emails, there is no $Sender as specified in auto_emailer.php. After this change:
// $tmessage->Send();
		 $headers = 'MIME-Version: 1.0' . "\r\n";
		 $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
		  mail($Recipiant, $Subject, $message, $headers);
the sender is my hosting server now:
user@secure2.apollohosting.com

Including $Sender in mail() doesn't work.

Thank you,

Alex
Absinthe Original Liquor Store

#82 Jack_mcs

  • Community Member
  • 24,436 posts
  • Real Name:Jack
  • Gender:Male

Posted 12 January 2006, 01:37

The way that code works is to include the all of the parts of the header in the $header variable. So you could use
$headers .= 'To: First person@test.com, Second person@ttest.com>' . "\r\n";
$headers .= 'From: me@test.com>' . "\r\n";
$headers .= 'Cc: you@test.com' . "\r\n";
$headers .= 'Bcc: all@test.com' . "\r\n";
Of course, the script isn't set up to include the customers that way. You could add a line
$headers .= $Sender;
which should work, I think.

Jack

#83 mr_absinthe

  • Community Member
  • 411 posts
  • Real Name:Alex
  • Location:London, UK

Posted 12 January 2006, 09:59

Thank you, with the following change in auto_announce.php, it seems to work now:
// $tmessage->Send();
		 $headers = 'MIME-Version: 1.0' . "\r\n";
		 $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
		 $headers .= 'From: me@test.com' . "\r\n";
		  mail($Recipiant, $Subject, $message, $headers);

I have not used this line: $headers .= $Sender; anywhere, is it needed?

Do you have an idea how to include description of new products in sent emails in one language only? We use four different languages in our shop therefore the descriptions are included 4 times in emails. I've been trying to use your advise from post #44 and after inserting language_id = ' . 1 . ' in mysql_query I received emails with no products nor descriptions in them. I have also tried to change it to all these variations:
pd.language_id = ' . 1 . '
p.language_id = ' . 1 . '
pd.language_id = '" . (int)$languages_id . "'
but nothing works. Any idea why?

With regards to thousands of test messages being received, When I insert the following in auto_emailer/auto_newproducts.php,
$tmessage->Send();
break;
I receive no email. When I delete it, I receive one for each customer, which is annoying and almost impossible to test.

Alex
Absinthe Original Liquor Store

#84 Jack_mcs

  • Community Member
  • 24,436 posts
  • Real Name:Jack
  • Gender:Male

Posted 12 January 2006, 14:02

I plan to add an option for languages in the next release (whenever that is). I don't know why that fix isn't working and I can't work on it right now.

You should receive one email with that break in there. I can't say what that isn't working. You could try this approach, which may work better for you. Add
$ctr = 0;
before the line that starts with
while ($customer = mysql...
After
	 $tmessage->Send();
add the following
if ($ctr > 5) 
 break;
$ctr++;
With that, you should receive 5 emails before it stops.

Jack

#85 DKarr

  • Community Member
  • 18 posts
  • Real Name:Deb Karr

Posted 18 January 2006, 16:22

Hello,
I am interested in this mod to get customer and order reports emailed to me. My question is: What is the necessity/purpose of the FCKEditor?
Thank you
-Deb

#86 Jack_mcs

  • Community Member
  • 24,436 posts
  • Real Name:Jack
  • Gender:Male

Posted 18 January 2006, 18:09

It is used in a few of the modules to allow you to create a better looking message to send. For the modules you want to use, it is not needed. You should be able to still run it but the ones that require it won't work.

Jack

#87 rodfdez

  • Community Member
  • 2 posts
  • Real Name:Rodrigo Fernandez de Lara

Posted 25 January 2006, 23:31

Does anyone knows what can be wrong? I get this every time I try to update the auto emailer settings:


Warning: fopen(auto_emailer/auto_emailer.php): failed to open stream: Permission denied in /home/webadmin/public_html/oscommerce/admin/includes/functions/auto_emailer.php on line 120

Warning: fwrite(): supplied argument is not a valid stream resource in /home/webadmin/public_html/oscommerce/admin/includes/functions/auto_emailer.php on line 130
Cannot write to file (auto_emailer/auto_emailer.php)

And when I try to send me a test:

Fatal error: Maximum execution time of 30 seconds exceeded in /home/webadmin/public_html/oscommerce/admin/auto_emailer_announce.php on line 103

Please help

#88 Jack_mcs

  • Community Member
  • 24,436 posts
  • Real Name:Jack
  • Gender:Male

Posted 25 January 2006, 23:42

For the write problem, make sure the permissions on the files in the auto_emailer directory are 755 (some hosts require 777).

For the timeout problem, try running the script from the browser. If it runs, then there is a problem with your cron setup. If it fails, take a look at the posts in the last few pages. There are some quick test scripts you could use to verify the basic code is working.

Jack

#89 Paragod

  • Community Member
  • 3 posts
  • Real Name:JLittle

Posted 28 January 2006, 19:06

I'm receiving the CRON e-mail but the content is: "No Database Selected".

What would cause this message? I can usually get these contributions to work but am not a PHP coder and can't troubleshoot the code very well. Any advice is GREATLY appreciated...

Thanks :blink:

#90 Jack_mcs

  • Community Member
  • 24,436 posts
  • Real Name:Jack
  • Gender:Male

Posted 28 January 2006, 20:19

If your shop is not in the root, you will need to change this line in auto_emailer.php:
include('../includes/configure.php');

Jack

#91 Paragod

  • Community Member
  • 3 posts
  • Real Name:JLittle

Posted 28 January 2006, 21:45

View PostJack_mcs, on Jan 28 2006, 03:19 PM, said:

If your shop is not in the root, you will need to change this line in auto_emailer.php:
include('../includes/configure.php');

Jack

Maybe I'm misunderstanding. I can't change that line because I can't find it in any of the auto_emailer.php files in any of the folders.

I even checked the install files (under various folders) that had auto_emailer.php and I can't find the line to change that you mentioned.

If you meant for me to add it, with path do I need to follow to which auto_emailer.php file.

Sorry for the need for specific's but I can't find it..

Jerry

#92 Jack_mcs

  • Community Member
  • 24,436 posts
  • Real Name:Jack
  • Gender:Male

Posted 29 January 2006, 01:42

Are you using the one named V 1.3? The first upload on that page should not be there and if you are using it, that is the problem.

Jack

#93 Paragod

  • Community Member
  • 3 posts
  • Real Name:JLittle

Posted 29 January 2006, 04:01

View PostJack_mcs, on Jan 28 2006, 08:42 PM, said:

Are you using the one named V 1.3? The first upload on that page should not be there and if you are using it, that is the problem.

Jack


Found the problem after checking my version.

A version 1.3.1 (I believe was updated by pinto192 reference an output file) is apparently not the most current version. The one listed before it has the mentioned file. If you check v1.3.1 you will notice auto_emailer.php doesn't include the file you wanted me to update.

After your help I have the right install and everything seems to work fine. Thank you very much for your help and a Great Contribution!

#94 valley

  • Community Member
  • 259 posts
  • Real Name:Sreedharan Pillai
  • Location:Wombourne, U.K.

Posted 29 January 2006, 06:23

Hello Jack,

Many many thanks for this wonderful contribution
and all the hard work you have put in to it.
It is not very often you see a really commercially USEFUL
contribution to OSC. This is a grat one.

I have managed to install with all the bug fixes along the way,
and am in the process of tryingit.
My CRON statement didn't seem to work, will come back to it
later. For now I try in the browser. I got test messages for
announcement though around 200 at a time as I have a customer
list of about 4000. I presume this is the host limiting
the outgoing messages at one time. Not sure about that.
will have to check with the host though it is a dedicated server.

So ihave unchecked the announcement and am trying the
CUSTOMER. I keep getting the following error
+++++++++++++
[Sun Jan 29 02:18:58 2006] [error] PHP Warning: fwrite(): supplied argument is not a valid stream resource in /home/affili43/affili43-www/catalog/admin/auto_emailer/auto_customers.php on line 61
[Sun Jan 29 02:18:57 2006] [error] PHP Warning: fwrite(): supplied argument is not a valid stream resource in /home/affili43/affili43-www/catalog/admin/auto_emailer/auto_customers.php on line 61
[Sun Jan 29 02:18:48 2006] [error] PHP Warning: fwrite(): supplied argument is not a valid stream resource in /home/affili43/affili43-www/catalog/admin/auto_emailer/auto_customers.php on line 61
+++++++++++++++++++++++

Line 61 in the file is fwrite( $_fp, $_csv_data );

However the same call is made before on line 31
+++++++++++++++++++++++++++++

Do you have some idea what is going on here ?

Best regards and many thanks in advance

#95 100asa

  • Community Member
  • 390 posts
  • Real Name:Remigio
  • Location:Italy

Posted 29 January 2006, 09:52

I've trouble: I always send by this contribution announce emails in text format.
How can I solve this?
Thank you
Skype: centoasa
Skype: remigioruberto

#96 Jack_mcs

  • Community Member
  • 24,436 posts
  • Real Name:Jack
  • Gender:Male

Posted 29 January 2006, 15:34

View Postvalley, on Jan 29 2006, 01:23 AM, said:

Line 61 in the file is fwrite( $_fp, $_csv_data );

However the same call is made before on line 31
+++++++++++++++++++++++++++++

Do you have some idea what is going on here ?

Best regards and many thanks in advance
Try placing this before the line that is failing
echo 'CSV for '$name.' - '..$_csv_data."\r\n";
You should reveive an emil containg what is in that variable. It must not be valid for some reason. See if it is failing for just one customer or just the first one.

Jack

#97 Jack_mcs

  • Community Member
  • 24,436 posts
  • Real Name:Jack
  • Gender:Male

Posted 29 January 2006, 15:35

View Post100asa, on Jan 29 2006, 04:52 AM, said:

I've trouble: I always send by this contribution announce emails in text format.
How can I solve this?
Thank you
I think the previous posts by mr_absinthe mentions having the same problem. He had to use the built-in mail functions to get it to work as I recall.

Jack

#98 valley

  • Community Member
  • 259 posts
  • Real Name:Sreedharan Pillai
  • Location:Wombourne, U.K.

Posted 29 January 2006, 18:17

View PostJack_mcs, on Jan 29 2006, 03:34 PM, said:

Try placing this before the line that is failing
echo 'CSV for '$name.' - '..$_csv_data."\r\n";
You should reveive an emil containg what is in that variable. It must not be valid for some reason. See if it is failing for just one customer or just the first one.

Jack

Hello Jack

Many thanks for your reply.
I have tried the cUSTOMER report again
but it seems to hang for a long time without any E Mail output.
As we have a list of 4000 customers, I tried again only
with the customer Checked in the admin set up leaving
out all other columns in the table. It still doesn't output
Not sure if it is a server issue.

As for the New product report it worked but with the same
multiple language issue described before in the forum
More over it produced ALL (more than 200 products)
THREE times each for ALL customers. even though
the Date was sey up ffrom First of Jan 2006 in the admin.
Somehow the admin set LIMIT was not applied

GOOD thing you have provided a way to test,Imagine
it going that way to the entire customer list !

I think the NEW product and the Announcement
are the two very useful features as the ORDERS and CUSTOMER
are easily accessed from the OSC admin.

The proposed feature for REVIEW follow up will be very
useful too.

I ave an issue with your LINKS contributionwhich I shall PM to you.

#99 Jack_mcs

  • Community Member
  • 24,436 posts
  • Real Name:Jack
  • Gender:Male

Posted 29 January 2006, 19:44

I'm not sure what effect having 4,000 customers will have. Maybe that is part of the problem. If your problem is like the other I mentioned, then you will need to change the email functions in the contribution.

If you have a Links Manger question, it should be asked it in the Links Manager support thread.

Jack

#100 100asa

  • Community Member
  • 390 posts
  • Real Name:Remigio
  • Location:Italy

Posted 29 January 2006, 20:15

Help me!
I've this in autoemailer/auto_announce.php:
		 // Mail it
		// $tmessage->SetHtmlContent($message);
		// $serverFileMimeType = 'text/html';
		// $tmessage->SetFileContent($pathToServerFile, $serverFileMimeType);
		 // $tmessage->Send();
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
$headers .= 'From: postmaster@100asa.it' . "\r\n";
mail($Recipiant, $Subject, $message, $headers);
	  }
  }
but the email message is this:
Content-type: text/html; charset=iso-8859-1
From: postmaster@100asa.it



		 <html>
		  <head>
		   <title>Happy birthday</title>
		  </head>
		  <body> 
<!-- start message //-->
auguri&nbsp;
<!-- stop message //-->
		 </body>
		 </html>

I see the html code! Why this?
Skype: centoasa
Skype: remigioruberto