[plugin] Mail2List v2.0.0b (with cron job possibilities)

3rd party code for phpList

For those

Postby Guest » 8:09am, Thu 20 Nov, 2008

Hello everyone,

I was trying to get the Mail to list plugin to work yesterday and it took me all day to figure this out (with the help of a friend).

I saw a couple of posts in this thread and the previous one saying that when you pressed the "Process New Emails" the page loaded untill the language selection combo box and then nothing.

Simply it was because php did not have imap support installed in my case it was resolved with an:
Code: Select all
apt-get install php5-imap php5-cli
.

Though I just mention it as the problem doesn't show an error unless I put the error_reporting(E_ALL); in the main.php file so that it spat out a fatal error saying it had no clue about the imap_open fuction.

seem obvious now that I have done it but since I'm not a php guru it wasn't obvious to begin with. :roll:

there is another thread that talks about imap support in php: http://forums.phplist.com/viewtopic.php?t=14051&highlight=imap&sid=c87d12e5cea61f59c3baa4faf1e3e1a2

anyway here's for my grain of salt, thank for the great plugin and for this great app!!
Guest
 

Re: [plugin] Mail2List v2.0.0b (with cron job possibilities)

Postby FernandoAlgarvio » 2:30pm, Thu 01 Oct, 2009

Hello!

I had the problem reported, but in my case it wasn't related with imap functions. When I run m2l_cron.php everything was working great. But when I pressed the “Process New Emails”, the page loaded until the language selection combo box and then stopped.

It was quite strange, since everything should be fine as the m2l_cron.php was working. After some time I figured out that in the interface, mailtolist really expects that you put the plugin in the /admin/plugins directory and nowhere else. On the other hand m2l_cron.php lets you put the plugin wherever you want.

Since PHPlist recommends that you put the plugins directory outside the structure of PHPlist to not interfere with the updates, I stored my plugins directory directly below the root of PHPlist (/plugins).

To make mailtolist to work I had to change the file mailtolist.php and where it was:

Code: Select all
var $coderoot = "plugins/mailtolist/";


I changed to:

Code: Select all
var $coderoot = "../plugins/mailtolist/";


In the file main.php, I changed:

Code: Select all
include($GLOBALS[coderoot] . "plugins/mailtolist/get_email.class.php");


to:

Code: Select all
include($GLOBALS[coderoot] . "../plugins/mailtolist/get_email.class.php");



Maybe this can help anyone who doesn't use the default plugin directory.

Regards,
Fernando Algarvio
FernandoAlgarvio
PL Nut
 
Posts: 17
Joined: 12:44pm, Wed 13 May, 2009
Location: Portugal

Re: [plugin] Mail2List v2.0.0b (with cron job possibilities)

Postby piff » 1:13pm, Sat 30 Jan, 2010

Hello,
I have problems in making cron work with Mail2List. Mail2list and PhpList are working fine and all the settings are correct and functioning but the cron is not working as it should

I have a cron instance to process the queue message of Phplist [/usr/local/bin/php /home/*domain*/public_html/*list*/admin/index.php -p processqueue > /dev/null] which work perfectly.

I have tried to add the cron job for Mail2List in order that the messages for the specified List (from the accredited e-mail) will be automatically sent.

As it was suggested I create an additional cron job and my cron tab look now like this:
__________

* * * * * /usr/local/bin/php /home/*domain*/public_html/*list*/m2l_cron.php -p processqueue > /dev/null
* * * * * /usr/local/bin/php /home/*domain*/public_html/*list*/admin/index.php -p processqueue > /dev/null
__________

The file "m2l_cron.php" is located in the pointed folder ... Did I mist-up something, what am I doing wrong?

Thanks you in advance for your help!!
piff
phpList newbie
 
Posts: 1
Joined: 12:52pm, Sat 30 Jan, 2010

Mail2List configuration

Postby peaces » 6:15pm, Wed 03 Feb, 2010

Sorry for the very newbie questions.

I have installed phpList 2.10.10 successfully and tested with no issue. I want to install mail2list so I can send an email to an address in my phpList for deploying to all my list reciepients.

My install of phpList is to a new folder on the same domain/server as my WP blog site.


1) Must I install mail2list and activate it in my WP site to use it with phpList? Or can I install it just to use with phpList?

2) If I can install it just for adding the plugin to phpList, where can I find those instructions?

The versions I am running are:
WP 2.8.4
phpList 2.10.10
mail2list 2_0_0b

Thanks in advance.

EDIT:
I figured it out on my own.... thanks for the bandwidth. 8)
peaces
phpLister
 
Posts: 7
Joined: 2:22pm, Wed 03 Feb, 2010

mail2list - "attachment path" help

Postby peaces » 5:56pm, Mon 08 Feb, 2010

I realize this is probably the newbiest question but I could use some help.
Attachments are not ending up in my attachments folder when sending to mail2list.

My domain is (wedgwoodna.org) and my attchments folder is (/public_html/email/attachments) on my server.

I have done the following in my get_email.class.php file:
$attach_url = "http://www.wedgwoodna.org/email/attachments/";
$file_path = "(/email/attachments/";

This obviously is incorrect because attachments don't show up in the file when using mail2list. They do show up when just creating an email in PHPlist to send.

I recieve this when sending an email with an attachment:
Error, when trying to send message 23 the attachment
2010_02/23warren_avatar128tall.JPG could not be found


Can someone guide me please?


MODERATOR NOTE: this post is related to the mail2list plugin but was posted outside the support topic/thread for that plugin. It has therefore been moved to the correct place.

Questions related to specific plugins are best posted in the corresponding thread. Do not create a new topic if you have a question related to a plugin/mod. That way you avoid clutter and will have a better chance of getting an answer from the author(s) of the plugin, or others using the same plugin.

Thanks!
peaces
phpLister
 
Posts: 7
Joined: 2:22pm, Wed 03 Feb, 2010

Outlook 2007 problem and fix

Postby bbmed » 12:09pm, Mon 22 Feb, 2010

Hi all,

Just thought I'd share a problem I have had with this plugin. Outlook 2007 (and possibly other versions of outlook) seems to add extra Microsoft style data to the emails, something which may look like the following example:

Code: Select all
<!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1" />
 </o:shapelayout></xml><![endif]-->


When reading the same email, if an image was placed in it (as far as I have checked outlook doesn't seem to allow inserting images without also attaching them to an email) outlook would only show the part of the template before the content, and nothing below it. Other clients showed the message and images fine. So the problem only occurred with outlook to outlook emails.

I checked the get_email_class.php file and noticed it had a section that regexed stuff like <head> tags and html comment tags out of the message, possibly to fix issues similar to this.

My fix involved adding this value to the array of regular expressions in the get_email_class.php file, to make it look like this:

Code: Select all
$replace_arr = array(
                     1    =>   "/<\/*HTML*>/i",
                     2   =>   "/<\/*HEAD*>/i",
                     3    =>   "/<!*HTML*>/i",
                     4    =>   "/<\/*BODY*>/i",
                     5    =>   "/<\/*TITLE*>/i",
                     6    =>   "/<!([^\[>]+)>/s",
                     7   =>  "/\<![ \r\n\t]*(--([^\-]|[\r\n]|-[^\-])*--[ \r\n\t]*)\>/s"
         );


The '7' value is what i added. I was eager to just get this problem fixed, so did not look deeply into it. But I hope this will help anyone with a similar issue. Now images sent from outlook to mail2list will load in outlook and the message works.

<head> tags and other outlook generated stuff is still now regexed out using my version of outlook. I think it might be worth getting some more rigorous regular expressions to make sure email clients don't add too much problematic data to the message, but for now what I did seems to have fixed my problem.
bbmed
phpList newbie
 
Posts: 2
Joined: 11:56am, Mon 22 Feb, 2010

Re: mail2list - "attachment path" help

Postby bbmed » 1:29pm, Mon 22 Feb, 2010

peaces wrote:I realize this is probably the newbiest question but I could use some help.
Attachments are not ending up in my attachments folder when sending to mail2list.

My domain is (wedgwoodna.org) and my attchments folder is (/public_html/email/attachments) on my server.

I have done the following in my get_email.class.php file:
$attach_url = "http://www.wedgwoodna.org/email/attachments/";
$file_path = "(/email/attachments/";

This obviously is incorrect because attachments don't show up in the file when using mail2list. They do show up when just creating an email in PHPlist to send.

I recieve this when sending an email with an attachment:
Error, when trying to send message 23 the attachment
2010_02/23warren_avatar128tall.JPG could not be found


Can someone guide me please?


MODERATOR NOTE: this post is related to the mail2list plugin but was posted outside the support topic/thread for that plugin. It has therefore been moved to the correct place.

Questions related to specific plugins are best posted in the corresponding thread. Do not create a new topic if you have a question related to a plugin/mod. That way you avoid clutter and will have a better chance of getting an answer from the author(s) of the plugin, or others using the same plugin.

Thanks!


Not sure if you've already sorted this problem out. But have you made sure the entry:
Code: Select all
define("ALLOW_ATTACHMENTS",1);


in the phplist config file is set to 1 , and also does the other config.php variable:
Code: Select all
$attachment_repository = '/path/to/attachments/';

match the path to attachments in the mail2list plugin?

Additionally, try sending the email with different mail clients, as I have had issues with particular mail clients not sending emails properly with this plugin.
bbmed
phpList newbie
 
Posts: 2
Joined: 11:56am, Mon 22 Feb, 2010

[plugin] Mail2List v2.0.0b BUGFIX

Postby pawkee » 7:09pm, Sat 16 Jul, 2011

In the Mail2List configuration overview, the list names would always come up blank.

replace the line starting with "$req2 = Sql_Query..." at line 375 with the following:


Code: Select all
$req2 = Sql_Query("SELECT * FROM ".$GLOBALS[table_prefix]."mail2list_list, ".$GLOBALS[table_prefix]."list WHERE ".$GLOBALS[table_prefix]."mail2list_list.listid=".$row['listid']." AND ".$GLOBALS[table_prefix]."mail2list_list.listid = ".$GLOBALS[table_prefix]."list.id");
pawkee
phpList newbie
 
Posts: 1
Joined: 7:00pm, Sat 16 Jul, 2011

Re: [plugin] Mail2List v2.0.0b (with cron job possibilities)

Postby vbiker » 6:10am, Tue 09 Aug, 2011

SaWey,

I don't know if you're even supporting this plug in or not anymore, but I at least wanted to ask you directly (and the forum as well). Has there been a definitive fix for when plain text emails are picked up by MailToList so that it will populate both the Message and TextMessage db fields?

I've read a couple of different opinions on the board, but they didn't seem to work. The most promissing seemed to be where the $msg is being added to the db.

Code: Select all
$msg = preg_replace($replace_arr,"",$msg);
         
         if($type == 'HTML') Sql_Query("UPDATE "  . $GLOBALS['table_prefix'] . "message SET message='".addslashes($msg)."', sendformat='".$this->sendformat."' WHERE ID= '".$this->newid."'");
         
         if($type == 'PLAIN') Sql_Query("UPDATE "  . $GLOBALS['table_prefix'] . "message SET textmessage='".addslashes($msg)."', sendformat='".$this->sendformat."' WHERE ID= '".$this->newid."'");


If textmessage" is changed to "message" then the "textmessage" field doesn't get populated. :-\ I haven't been able to follow all of the calls on this, but can there be two "message SET" commands in the IF statement? How should the code look?

Thank you for creating a great plug-in to PHPList. I appreciate your time and efforts.

-Scott

phplist - version 2.10.13
mailtolist v2.0.0b
PHP version 5.2.13
Apache version 2.2.15
vbiker
phpList newbie
 
Posts: 3
Joined: 5:26pm, Sun 31 Jul, 2011

Mailtolist - please help!

Postby troop525web » 6:20pm, Wed 10 Aug, 2011

I have downloaded, installed and configured the 'mailtolist' plugin for phplist. In order to process mail for a list our webhost server requires SSL (or TLS) for SMTP (or POP) on port 587 (or 110). In the config for mailtolist I have this as "/pop3:587/SSL". I have tried a combination of ports with /SSL and /NOSSL with no luck. With current config I receive this error: "TLS/SSL failure for pop.troop525.org: SSL negotiation failed".

Does the plugin fully support TLS or SSL and if so how do I make this work? THanks.
troop525web
phpList newbie
 
Posts: 1
Joined: 12:33pm, Wed 10 Aug, 2011

Re: [plugin] Mail2List v2.0.0b (with cron job possibilities)

Postby timtak » 5:19am, Wed 17 Aug, 2011

Can this plugin be used to convert phplist to a discussion list?

In other words can all subscribers and only subscribers post to the list or is it only for admins?
timtak
PL Nut
 
Posts: 21
Joined: 6:56am, Sun 31 Jul, 2011

Re: [plugin] Mail2List v2.0.0b (with cron job possibilities)

Postby gu78 » 2:59pm, Tue 04 Jun, 2013

Hi!

I've done a fresh installation of PHPlist + Mail2List and works fine, but when I send an HTML email to the plugin mailbox I receive a blank message with the footer in plain text.

The footer is with bad character encoding (i'm using spanish utf8), so I get strange characters. I've checked file encoding and it's correct.

Any clue to fix all the issues?

Regards
gu78
phpList newbie
 
Posts: 2
Joined: 2:47pm, Tue 04 Jun, 2013

Re: [plugin] Mail2List v2.0.0b (with cron job possibilities)

Postby gu78 » 4:02pm, Tue 04 Jun, 2013

Okej, I've found an issue in the useless function "check_sendformat".

I've found the source of my problem in the thunderbird, changing encoding to UTF8 solves the character issue, but the footer still being broken.
gu78
phpList newbie
 
Posts: 2
Joined: 2:47pm, Tue 04 Jun, 2013

Previous

Return to Contributions: Plug-ins, Add-ons, Mods

Who is online

Users browsing this forum: No registered users and 3 guests