a little clear-up: You posted a snippet of code that required the gpgme package. Web2py Mail are only compatible with python-pyme package.... you don't need to do any import in the models because it's imported directly by web2py
https://github.com/web2py/web2py/blob/master/gluon/tools.py#L481 On Monday, January 27, 2014 10:30:28 PM UTC+1, horridohobbyist wrote: > > Oh, wait a sec...there are two references in my Google search for the > web2py book, one of which is probably an older version. This confused me. > > > On Monday, 27 January 2014 16:25:52 UTC-5, horridohobbyist wrote: >> >> From the web2py book: >> >> It is possible to send PGP encrypted emails. First of all you need to >> install the *python-pyme* package. Then you can use GnuPG (GPG) to >> create the key-files for the sender (take the email-address from >> mail.settings.sender) and put the files pubring.gpg and secring.gpg in a >> directory (e.g. "/home/www-data/.gnupg"). >> >> >> Is the book lying to me? >> >> >> On Monday, 27 January 2014 15:17:16 UTC-5, Niphlod wrote: >>> >>> you need the gpgme package, not the python-pyme one >>> >>> On Monday, January 27, 2014 8:42:33 PM UTC+1, horridohobbyist wrote: >>>> >>>> As per the web2py book, I installed the python-pyme package in Ubuntu >>>> Server and inserted the following into db.py: >>>> >>>> from gpgme import pgp >>>> mail.settings.cipher_type = 'gpg' >>>> mail.settings.sign = True >>>> mail.settings.sign_passphrase = 'your passphrase' >>>> mail.settings.encrypt = True >>>> >>>> I get "ImportError: No module named gpgme". Is there something else I >>>> have to do?? >>>> >>>> I have verified that python-pyme is indeed installed. >>>> >>>> Thanks. >>>> >>> -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.

