If the `web.base.url` contains a trailing `/`, the replacement of the
`/unsubscribe_from_list` link won't work since the string to replace
will be `my_url//unsubscribe_from_list` instead of
`my_url/unsubscribe_from_list`.
Fixes#24731
opw-1848572
When installing the website with a lang different than the one set
on the user, the button unsubscribe in the mass mailing snippets
didn't work because the unsubscribe link contains the code of the
language. The function send_get_email_dict in model mail.mail didn't
expect this behavior and so couldn't set the right unsubscribe link
in the mail.
opw:1850696
In Python 3, all of these were "consolidated" under urllib(.request,
.parse, .errors) which is inconvenient.
Since we already have hard dependencies on requests and
werkzeug(.urls, which is a backport of Python 3's unicode-aware
urllib.parse) migrate *everything* to that.
A sticking point is urllib2.URLError, those were (mostly) replaced by
the slightly more general IOError which URLError extends.
link_tracker use a regex to determine the content of
a 'href' tag, taking the 'mailto:xxxx@yyyy.zz' case
into account. mass_mailing use another regex that simply
don't.
So when sending a mass mailing containing email link,
the email will be appended by url path of tracking
url '/m/<stat_id>'.
This commit makes mass_mailing use the same regex as
link_tracker (which is in the dependencies of mass_mailing).
opw-727779
Partial backport of 9.0 commit a14f89c8 to 8.0
<base href=""> are not well supported in some webmails
Replace absolute URLs by full path appending the domain.
Closes#10062
When resending emails whose statistics are in exception, erase the exception date
from the statistics. Indeed what is important is that they have been sent. Moreover
the mailing statistics are wrong as you could have sent emails still considered
as in exception.
This fix is about several issue of office oulook:
- a fixed table width must be in pixel, using 100% of parent div width
doesn't work,
- a background-color on a div is not used, the background color should
be on the table inside this div using the attribute "bgcolor",
- the only way to center a table is to have a `<center>` tag arround it,
or have an element arround it with "text-align: center",
- having a background image doesn't seem to be possible.
The two first are straightforward, but for the third:
- in non-outlook: all the snippet are centered (since they all have
"margin: auto" which is valid outside outlook),
- in outlook: only a small part of the snippet with text-align:center
or `<center>` arround them are centered.
To escape a bigger code change, this commit unify the outlook
behaviour by having all of the snippet left aligned in outlook (they are
still middle centered in other application).
For the background image, we need a fallback bgcolor and thus we need to
have the background on the table element. There was also an issue
between relative and absolute url for gmail.
closes#9019
opw-650217
The `<base />` tag isn't handled by outlook.com, thus all relative link
to image fail to be shown.
This fix treat the most common case by using absolute url instead of
relative url.
related to opw-648463
related to the mail.mail model in their own mail_mail.py file. This ease
the process of working on the mail.mail model and inheritance, if the
code is not hidden between unrelated models.
- Preserved explicit 3rd-party copyright notices
- Explicit boilerplate should not be necessary - copyright law applies
automatically in all countries thanks to Berne Convention + WTO rules,
and a reference to the applicable license is clear enough.
1. The merge of the "email_template" module into the "mail" module.
2. The send action of the mass mailing has been moved from the frontend to a cron, because it was too slow to send over 10,000 mails (the user's browser was blocked for 15 - 20 minutes). Mass mailings have now their own process in the kanban view.
3. Mails sent from the mail form are sent immediatly instead of from the mail queue (for instance, when you go to sales > customers > list view > select 2 -3 customers > More > Partner Mass Mailing).
4. Users have now the choice from which mailing list they want to unsubscribe when they click on the unsubscribe link at the bottom of the mail.
5. Mass mailings inherit from their campaign UTMs and mass mailing campaigns are linked to an UTM campaign.
6. Many little improvements
- [FIX] bounce regex: too many emails were considered as bounce and therefore
not displayed in the chatter and lost for the communication history. The regex
was not correctly looking for the bounce alias in the email_to.
- [FIX] invite email: replying to the invitation email (invitation as new
follower) now replies to the user sending the invitation.
- [FIX] mass_mailing: added a column to store the id of the original email
in addition to the many2one column. The many2one is set to null when deleting
the original email. As the information is necessary, it is saved on another
field. The many2one is necessary for indexes purpose as the inverse of
a one2many.
The emails containing emails generated with the image widget have absolute path (src='/website/static/...'), adding <base> tag allows the mail client to load it correctly.
- now workign on various models, taking the correct recipient (email, partner_id for partner or lead)
- improved test send: use email_to, now a many2many on contact model to ease the use of templates
- added action to create a mailing list from leads
- moved a res.partner dedicated action to its own file
- added an actoin to create a mailing list from contacts
- fixed mail_mail post_process: use mail_sent variable as mail.state is not available
bzr revid: tde@openerp.com-20140318164117-f2aou25u633j8m57