WebFaction
Community site: login faq

i am dong web development with zope for first time. I need to generate 2 emails with zope mailhost to send username and password differently to user.(with python method). can you help me in this regard?

asked 16 Jun '11, 08:11

harpreet
111
accept rate: 0%

edited 16 Jun '11, 09:20

seanf
12.2k41836


If you're asking how to send email with Zope from Python, it's quite simple:

to_addr = 'somebody@somewhere.com'
from_addr = 'you@domain.com'
subject = 'This is the subject'
body = 'This is the body of the message'

context.MailHost.simple_send(to_addr, from_addr, subject, body)

Just replace those variables with whatever you need. Hope that helps!

permanent link

answered 16 Jun '11, 11:40

seanf
12.2k41836
accept rate: 37%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×261
×18

question asked: 16 Jun '11, 08:11

question was seen: 2,572 times

last updated: 16 Jun '11, 11:40

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2019 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM