[mod] View HTML Email in Browser

3rd party code for phpList

Re: [mod] View HTML Email in Browser

Postby xannonite » 2:22pm, Fri 09 Mar, 2012

@guiabase:
If you set PHPMAILER to zero, then the other settings you have listed are not used. Looking at the comment next to that setting, it sounds like you are having trouble with this mod when forwarding messages. The latest version of this mod specifically ignores forwarded messages because they do not have the proper IDs. The previous version does not ignore them, but they won't be inserted properly into the database.

@appa:
This mod is designed to only work with HTML messages, since e-mail clients generally do not have a problem displaying plain text. Even if it did work with plain text, the version you'd see online would also be plain text, so it would be pointless.
xannonite
PL Nut
 
Posts: 36
Joined: 4:50pm, Tue 24 Feb, 2009

Re: [mod] View HTML Email in Browser

Postby appa » 3:26pm, Fri 09 Mar, 2012

xannonite wrote:
@appa:
This mod is designed to only work with HTML messages, since e-mail clients generally do not have a problem displaying plain text. Even if it did work with plain text, the version you'd see online would also be plain text, so it would be pointless.


Hi xannonite,

Thanks for your reply.

Do you have any idea about how to let the users whom can only read text format email to have the link(URL address) of the online version?
appa
phpLister
 
Posts: 6
Joined: 10:41am, Sat 05 Nov, 2011

Re: [mod] View HTML Email in Browser

Postby xannonite » 6:16pm, Fri 09 Mar, 2012

appa wrote:Do you have any idea about how to let the users whom can only read text format email to have the link(URL address) of the online version?


Unfortunately that is work for a different mod. A round-about way would be to create a special user account for receiving HTML messages, send the message to that account, then copy/paste the link into the plain text message that you send to your regular users. The web version wouldn't be personalized, but it would at least provide the additional content. However, if the bulk of your users can only use plain text, it would probably be easier to manually create a static HTML page on your website and link to it in your e-mail.
xannonite
PL Nut
 
Posts: 36
Joined: 4:50pm, Tue 24 Feb, 2009

Re: [mod] View HTML Email in Browser

Postby guiabase » 3:13pm, Tue 13 Mar, 2012

xannonite wrote:@guiabase:
If you set PHPMAILER to zero, then the other settings you have listed are not used.


Helo xannonite,

Thank you for your reply.
As this mod works only with HTML messages (the only type I use) I made this change:

//if($hash != 'forwarded' && preg_match('/(<html>)|(<head[^>]*>)|(<body[^>]*>)/i', $mail->Body)) {
if($hash != 'forwarded' ) {

Now I can (at config.php)

define("PHPMAILER",0);

and this works ok.
Hope I'm not negleting something important with this change.
Thank you.
guiabase
phpList newbie
 
Posts: 2
Joined: 10:48am, Mon 24 Oct, 2011

Re: [mod] View HTML Email in Browser

Postby xannonite » 3:26pm, Tue 13 Mar, 2012

guiabase wrote:Hope I'm not negleting something important with this change.


Well, as I mentioned, the link is just going to point to the plain-text content. The user won't see anything more than what is already in the e-mail.
xannonite
PL Nut
 
Posts: 36
Joined: 4:50pm, Tue 24 Feb, 2009

Re: [mod] View HTML Email in Browser

Postby brizio » 9:57pm, Sat 07 Apr, 2012

xannonite wrote:
bhup18 wrote:using latest mod 1.2.2

Bug?

If you use [VIEWMESSAGEURL] tag more than once in the message, the link may not be replaced correctly or just with "http://" .

Discovered this by accident.


Do you also have this problem with other tags that insert URLs? This mod uses the same functions that phplist uses (namely preg_replace and eregi_replace.) If there is a bug, it should affect other tags as well. If you are checking the source in the e-mail after you receive it, try checking the source in the database instead.

I have the same problem and I solved it:
The error is the last parameter '1' in the function' preg_replace', this indicates the number of substitutions made, if you remove work fine:
Find:
Code: Select all
$htmlmessage = preg_replace("/\[VIEWMESSAGEURL\]/i",$GLOBALS['scheme'].'://'.$website.$GLOBALS["pageroot"].'/vm.php?m='.$messageid.'&u='.$hash,$htmlmessage,1);

Replace With:
Code: Select all
$htmlmessage = preg_replace("/\[VIEWMESSAGEURL\]/i",$GLOBALS['scheme'].'://'.$website.$GLOBALS["pageroot"].'/vm.php?m='.$messageid.'&u='.$hash,$htmlmessage);


bye
brizio
phpList newbie
 
Posts: 1
Joined: 9:38pm, Sat 07 Apr, 2012

Re: [mod] View HTML Email in Browser

Postby hellraiserpop » 9:22am, Tue 21 Aug, 2012

Using additional tables to store them seems heavy handed. I'm beginning work on a similar plugin that tries to display the message with user data by dynamically reconstructing the message from the content and template(if it encounters tags with no associated data, it'll probably simply show an error message). My reasoning is that very few people use this feature (mostly outlook/hotmail suckers who can't see background images), so it makes more sense to generate it on the fly instead of incurring additional storage overhead.
hellraiserpop
phpList newbie
 
Posts: 2
Joined: 11:25am, Thu 09 Aug, 2012

Re: [mod] View HTML Email in Browser

Postby Jappie » 1:37pm, Tue 21 Aug, 2012

Hello Hellraiserpop,

Before you set off on your development, you might want to have a look at a development that has already been done using a "dynamic" approach to generate the newsletter: http://forums.phplist.com/viewtopic.php?f=7&t=36190&p=85605&hilit=unixum#p85605

Might be of interest and help.

Cheers Jappie
Last edited by Jappie on 10:22am, Wed 06 Aug, 2014, edited 1 time in total.
Jappie
phpLister
 
Posts: 14
Joined: 8:20pm, Thu 14 Jul, 2011

Re: [mod] View HTML Email in Browser

Postby mrmckoy » 4:56am, Mon 10 Dec, 2012

Awesome mod... I think this should be a standard part of Phplist.

Only question I have is can this be made indexable by search engines like google? That would be awesome as well.
mrmckoy
PL Master
 
Posts: 169
Joined: 7:10am, Sat 24 Nov, 2007
Location: Atlanta, GA

Re: [mod] View HTML Email in Browser

Postby xannonite » 5:25am, Mon 10 Dec, 2012

Search engines index pages by following links. You could theoretically create a page with links to all of your e-mails by pulling the information from the database. This page could then be crawled and indexed. However, there are some privacy and security issues to consider. For example, if the e-mail messages are personalized, you would be publicly displaying and linking the database ID and personal information of all of your users.
xannonite
PL Nut
 
Posts: 36
Joined: 4:50pm, Tue 24 Feb, 2009

Re: [mod] View HTML Email in Browser

Postby mrmckoy » 7:02am, Mon 10 Dec, 2012

xannonite wrote:Search engines index pages by following links. You could theoretically create a page with links to all of your e-mails by pulling the information from the database. This page could then be crawled and indexed. However, there are some privacy and security issues to consider. For example, if the e-mail messages are personalized, you would be publicly displaying and linking the database ID and personal information of all of your users.



I totally agree. Maybe the ramifications could be absolved by somehow marking each list as public/private or giving a tag to each individual message. My guess is that auto-generated news-lists would find this most beneficial.

To get the search engines to find the HTML pages i'm also guessing some sort of sitemap could be used and submitted to the search engines automatically by using RPC.
mrmckoy
PL Master
 
Posts: 169
Joined: 7:10am, Sat 24 Nov, 2007
Location: Atlanta, GA

Re: [mod] View HTML Email in Browser

Postby Malbrouck » 9:45am, Wed 06 Aug, 2014

Hello,

Has this mod been integrated into phplist v3 ?

If no is it compatible with phplist v3 ?
Malbrouck
phpList newbie
 
Posts: 2
Joined: 9:41am, Wed 06 Aug, 2014

Re: [mod] View HTML Email in Browser

Postby Dragonrider » 10:03am, Wed 06 Aug, 2014

Malbrouck wrote:Hello,

Has this mod been integrated into phplist v3 ?

If no is it compatible with phplist v3 ?


This version is compatible and is probably what you are looking for?
My sites:- http://wharfedalefestival.co.uk, http://ilkleygardeners.org.uk, http://emergencyaid.net, http://dragonrider.co.uk
Latest phpList version is now 3.0.12 (3 February 2015) and requires a minimum of MySQL 5.0 and PHP 5.3.x
Dragonrider
Moderator
 
Posts: 3460
Joined: 6:58am, Sun 02 Jul, 2006
Location: Ilkley, West Yorkshire, United Kingdom

Re: [mod] View HTML Email in Browser

Postby Malbrouck » 11:32am, Wed 06 Aug, 2014

Yes indeed ! And it works !

Thanks Dragonrider.
Malbrouck
phpList newbie
 
Posts: 2
Joined: 9:41am, Wed 06 Aug, 2014

Previous

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

Who is online

Users browsing this forum: No registered users and 4 guests