Announcement

  •  » Themes
  •  » New mail system

#1 2013-10-06 16:47:16

mistic100
Former Piwigo Team
Lyon (FR)
2008-09-27
3277

New mail system

hello

it was discussed in another topic (can't find it) about rewriting mail system and template

-- the system :
In Piwigo we have big functions managing mails, unfortunately not complete, too complex and containing errors (in headers and boundaries)

plg wants to use https://github.com/Synchro/PHPMailer, it's used by Wordpress and relatively light (compared to others like systems Swiftmailer)


-- the template :
fact : having the mail theme depending on the current gallery theme is a bad idea, we ends up with a big mess, sometimes not working on some mailers

Now I think like plg : we should only propose two mail themes (dark and clear), obviously extendable with CSS.

I worked a little on it and produced this http://www.strangeplanet.fr/files/piwigo_mail (look at the source code, there are some infos about Smarty variables)
It's based on what I use for some of my plugins but using <table> instead of <div> (very oldshcool but it's what is advised on many blogs/forums).
I also know that some mailers don't support in <head> CSS, so a maximum of rules have to be setted inline.


Now this template needs to be tested on as many mailers as possible. Personally I have Thunderbird, Roundcube, Outlook (web) and Gmail.
Do you guys have other systems ? I want to test at least on Outlook (desktop), Yahoo and the main ISP mailers.

Offline

 

#2 2013-10-06 17:16:49

flop25
Piwigo Team
2006-07-06
7037

Re: New mail system

Hi
PHPMailer is indeed the best solution

about theme, it would be great to have a theme array variable or 3 theme var to declare if the theme is for desktop, mobile, or mail . And that' would be displayed in the administration with 3 little icons. I would like to say 'that's a non exclusive or', but that could bring back the same issue, if we use the current Clear and Dark theme as desktop+mail theme: we could allow a theme to be  desktop, mobile, or/and mail, but fo that way, we should create two clear/dark theme for mail only

Whatever the solution chosen, we might also think about the inheritance of 'mail theme'.

ps : I can test on gmail and yahoo and maybe outlook

what a big project ^^! Great you work on it guys


To get a better help : Politeness like Hello-A link-Your past actions precisely described
Check my extensions : more than 30 available
who I am and what I do : http://fr.gravatar.com/flop25
My gallery : an illustration of how to integrate Piwigo in your website

Offline

 

#3 2013-10-06 17:32:42

mistic100
Former Piwigo Team
Lyon (FR)
2008-09-27
3277

Re: New mail system

flop25 wrote:

it would be great to have a theme array variable or 3 theme var to declare if the theme is for desktop, mobile, or mail . And that' would be displayed in the administration with 3 little icons. I would like to say 'that's a non exclusive or'

that's what was discussed in the old topic
but, do you have any idea of useable GUI for the admin ? because just saying "this theme will change your mails" without allowing to choose another mail theme is not an interesting evolution

and is it usefull ? I don't think so, mails are a very small part of the gallery

have the simplest system gets rid of many problems : interoperability, inheritance, theme coders without any knowledges of mails specificities (like me...)

Offline

 

#4 2013-10-06 19:14:39

Eric
Former Piwigo Team
VALENCE (FR)
2005-03-25
1768

Re: New mail system

Hi guys !

Great and heavy project !

I can test on Horde, Roundcube, SquirrelMail, Zimbra and Gmail.

Offline

 

#5 2013-10-06 22:46:41

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
13791

Re: New mail system

mistic100 wrote:

[...] have the simplest system gets rid of many problems : interoperability, inheritance, theme coders without any knowledges of mails specificities (like me...)

I agree with that: let's have only 2 email themes. Completely separated from "gallery themes". We don't need more (if we can overload CSS rules, it's even better).

On the User Interface side, let's just have a dark/clear selector (clear by default) on [Administration > Configuration > Options > Main]. Exactly the same selector as in Contact Form configuration would be perfect.

http://piwigo.org/forum/showimage.php?pid=146738&amp;filename=theme-selector-contact-form.png

mistic, can I implement phpmailer while you work on template/theme? (without generating conflicts in email functions file)

Offline

 

#6 2013-10-06 23:51:10

msakik
Translation Team
São Paulo, Brazil
2013-09-06
78

Re: New mail system

Hi, I have done some work putting phpmailer and it is working reasonably for me (zimbra), at least using auth mode. I´ll try to make a diff this week. SHould it be posted at bug report?

Offline

 

#7 2013-10-07 07:38:47

mistic100
Former Piwigo Team
Lyon (FR)
2008-09-27
3277

Re: New mail system

@msalik: our idea is to start from scratch so I don't know if we can reuse anything

@plg: well if you want to do the hard part :-)
Did you look at my source code ?
There is obviously a variable for the main content, I also wanted a variable to add content in the footer, one to add custom css without prefilter and one to change the subtitle of the mail (the idea is to always have the gallery name as title but change the subtitle to "notification", "contact", etc)

Also keep in mind to load local css :-) (I don't even know if it's currently editable by LFE)

Edit: and make the contact link modifiable (for contact form)

Offline

 

#8 2013-10-07 14:01:07

msakik
Translation Team
São Paulo, Brazil
2013-09-06
78

Re: New mail system

I have done a patch at [Bugtracker] ticket 2965

This just changes the old api to phpmailer.
It needs phpmailer to be manualy included because it's not in diff.

I tried to cleanup boundary mimepart and some stuffs from template because phpmailer already do it but there are still some to clean.

I think there are two distinct issues: one is the mailer that replacement maybe is not so complicated because the body is sent done to phpmailer to delivery. In this patch I  change the template as least as possible.
The other one is the template and other stuffs that need more rework.

Offline

 

#9 2013-10-09 23:02:36

flop25
Piwigo Team
2006-07-06
7037

Re: New mail system

jsut a thing I've thought: we should 'triggers' mail functions in order to allow Chimpmail or otehr services to be able to work more easily with Piwigo


To get a better help : Politeness like Hello-A link-Your past actions precisely described
Check my extensions : more than 30 available
who I am and what I do : http://fr.gravatar.com/flop25
My gallery : an illustration of how to integrate Piwigo in your website

Offline

 

#10 2013-10-10 13:51:25

mistic100
Former Piwigo Team
Lyon (FR)
2008-09-27
3277

Re: New mail system

what do you mean ? what kind of triggers ?

========

ok so I'll need your different mail addresses to send you the test mail

Offline

 

#11 2013-10-10 14:04:26

flop25
Piwigo Team
2006-07-06
7037

Re: New mail system

don't know technically how. since the system is rebiuld, it woul be great if any pro could easily implement any mail senders. I know mails are send on register etc which already have their own triggers, but maybe not all, now and in the future and not for plugins. so i was thinking of a trigger when the function, to send the mail with the content and emails as vars, is called

sending you the addresses


To get a better help : Politeness like Hello-A link-Your past actions precisely described
Check my extensions : more than 30 available
who I am and what I do : http://fr.gravatar.com/flop25
My gallery : an illustration of how to integrate Piwigo in your website

Offline

 

#12 2013-10-10 15:17:28

msakik
Translation Team
São Paulo, Brazil
2013-09-06
78

Re: New mail system

Hi, I wish to know If the patch I submitted is ok, so I can go on working on it.
the phpmailer lib is very simple to use in the way that it can be  incapsulated by a simple call with destination, subject and bosy. It is capable of all usual way of sending like sendmail, smtp, auth smt, etc.

So the trigger isn´t similar to call a simple function to send the emails?

Offline

 

#13 2013-10-10 15:18:35

mistic100
Former Piwigo Team
Lyon (FR)
2008-09-27
3277

Re: New mail system

gmail: ok
thunderbird: ok
roundcube: header broken (http://img203.imageshack.us/img203/3557/78t3.png) for me, not for plg
outlook (web): ~ok, ordered list is not aligned
horde: ok
squirrelmail: a striptags is applied, perhaps it will work when using text/plain + text/html with boundaries

I use http://www.pelagodesign.com/sidecar/emogrifier to transform CSS to inline (gmail compatibility)

waiting the mails of Eric for some more tests

Offline

 

#14 2013-10-10 15:42:31

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
13791

Re: New mail system

msakik wrote:

Hi, I wish to know If the patch I submitted is ok, so I can go on working on it.
the phpmailer lib is very simple to use in the way that it can be  incapsulated by a simple call with destination, subject and bosy. It is capable of all usual way of sending like sendmail, smtp, auth smt, etc.

So the trigger isn´t similar to call a simple function to send the emails?

I'm working on it :-) I want to use phpmailer not only to replace SMTP protocol. This means bigger changes in functions_mail.inc.php.

Offline

 

#15 2013-10-10 16:24:15

msakik
Translation Team
São Paulo, Brazil
2013-09-06
78

Re: New mail system

Ok, I´ll wait for. Thanks.

Offline

 
  •  » Themes
  •  » New mail system

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact