Comments (7)
Unicode email bodies work. I haven't tried a Unicode sender name. Do you think you could provide a very small example that fails with the current implementation? Then, I can take a look at how to make it work.
from mailmerge.
see attached.
from mailmerge.
I'm a little confused. It seems to work as expected for me:
$ mailmerge --version
mailmerge, version 1.7.6
$ mailmerge
>>> message 0
TO: [email protected]
SUBJECT: Foo
FROM: Brian Exelbierd <[email protected]>
Hi Kristýna,
>>> sent message 0 DRY RUN
>>> Limit was 1 messages. To remove the limit, use the --no-limit option.
>>> This was a dry run. To send messages, use the --no-dry-run option.
$ file mailmerge_template.txt mailmerge_database.csv
mailmerge_template.txt: ASCII text
mailmerge_database.csv: UTF-8 Unicode text
$ cat mailmerge_template.txt
TO: {{Email}}
SUBJECT: Foo
FROM: Brian Exelbierd <[email protected]>
Hi {{Name}},
$ cat mailmerge_database.csv
Name,Email
Kristýna,[email protected]
from mailmerge.
Please try it with some valid email addresses and send an actual message.
from mailmerge.
I am experiencing the same issue with UTF8 text in email bodies: the dry run succeeds, but sending email fails.
$ file mailmerge_template.txt
mailmerge_template.txt: ASCII text
$ file mailmerge_database.csv
mailmerge_database.csv: UTF-8 Unicode text
$ python --version
Python 3.5.2
$ mailmerge --version
mailmerge, version 1.7.7
$ mailmerge
>>> message 0
TO: [email protected]
SUBJECT: Testing mailmerge UTF8 support
FROM: [email protected]
Content-Type: text/plain; charset="UTF-8"
Hi, Séan
>>> sent message 0 DRY RUN
>>> Limit was 1 messages. To remove the limit, use the --no-limit option.
>>> This was a dry run. To send messages, use the --no-dry-run option.
$ mailmerge --no-dry-run
>>> message 0
TO: [email protected]
SUBJECT: Testing mailmerge UTF8 support
FROM: [email protected]
Content-Type: text/plain; charset="UTF-8"
Hi, Séan
>>> Read SMTP server configuration from mailmerge_server.conf
>>> host = smtp.gmail.com
>>> port = 465
>>> username = [email protected]
>>> security = SSL/TLS
>>> password for [email protected] on smtp.gmail.com:
Traceback (most recent call last):
File "/path/to/mailmerge/env/bin/mailmerge", line 9, in <module>
load_entry_point('mailmerge==1.7.7', 'console_scripts', 'mailmerge')()
File "/path/to/mailmerge/env/lib/python3.5/site-packages/click/core.py", line 722, in __call__
return self.main(*args, **kwargs)
File "/path/to/mailmerge/env/lib/python3.5/site-packages/click/core.py", line 697, in main
rv = self.invoke(ctx)
File "/path/to/mailmerge/env/lib/python3.5/site-packages/click/core.py", line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/path/to/mailmerge/env/lib/python3.5/site-packages/click/core.py", line 535, in invoke
return callback(*args, **kwargs)
File "/path/to/mailmerge/env/lib/python3.5/site-packages/mailmerge/__main__.py", line 45, in cli
config_filename=config_filename,
File "/path/to/mailmerge/env/lib/python3.5/site-packages/mailmerge/api.py", line 232, in main
sendmail(message, config_filename)
File "/path/to/mailmerge/env/lib/python3.5/site-packages/mailmerge/api.py", line 94, in sendmail
message.as_string(),
File "/usr/lib/python3.5/smtplib.py", line 850, in sendmail
msg = _fix_eols(msg).encode('ascii')
UnicodeEncodeError: 'ascii' codec can't encode character '\xe9' in position 160: ordinal not in range(128)
$ cat mailmerge_template.txt
TO: [email protected]
SUBJECT: Testing mailmerge UTF8 support
FROM: [email protected]
Content-Type: text/plain; charset="UTF-8"
Hi, {{name}}
$ cat mailmerge_database.csv
email,name,number
[email protected],"Séan",17
[email protected],"Bob",42
from mailmerge.
Update: I can reproduce this bug.
from mailmerge.
This is now fixes in version 1.7.8
from mailmerge.
Related Issues (20)
- Recipe for machine-readable messages
- FEATURE MISSING: personal attachments HOT 2
- Block list HOT 1
- Apple Mail with attachments issue (former title: UTF-8 support issue) HOT 11
- Move test dependecies to extras_require
- Debug flag
- mails limit per mail feature HOT 5
- Interactive mode
- Drop Python 2 Support HOT 5
- Change CI to GitHub Actions
- setup.py has "html5" but It has a new name "html5lib"
- Inline images not working in thunderbird? HOT 5
- Crashes on email adresses with illegal characters HOT 2
- Replace `setup.py` with `pyproject.toml`
- Support CSV files with semicolons as separators HOT 3
- Add support for 2FA OAuth authentication HOT 2
- New release on Pipy HOT 1
- No mailmerge_server.conf file in the repository HOT 2
- Load system default SSL cert
- Space at the end of the header row
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mailmerge.