Vega strike Python Modules doc  0.5.1
Documentation of the " Modules " folder of Vega strike
 All Data Structures Namespaces Files Functions Variables
smtplib Namespace Reference

Data Structures

class  SMTPException
 
class  SMTPServerDisconnected
 
class  SMTPResponseException
 
class  SMTPSenderRefused
 
class  SMTPRecipientsRefused
 
class  SMTPDataError
 
class  SMTPConnectError
 
class  SMTPHeloError
 
class  SMTPAuthenticationError
 
class  SSLFakeSocket
 
class  SSLFakeFile
 
class  SMTP
 

Functions

def quoteaddr
 
def quotedata
 
def prompt
 

Variables

list __all__
 
int SMTP_PORT = 25
 
string CRLF = "\r\n"
 
tuple fromaddr = prompt("From")
 
tuple toaddrs = prompt("To")
 
string msg = ''
 
tuple line = sys.stdin.readline()
 
tuple server = SMTP('localhost')
 

Function Documentation

def smtplib.prompt (   prompt)

Definition at line 678 of file smtplib.py.

References string.strip().

679  def prompt(prompt):
680  sys.stdout.write(prompt + ": ")
681  return sys.stdin.readline().strip()
def smtplib.quoteaddr (   addr)
Quote a subset of the email addresses defined by RFC 821.

Should be able to handle anything rfc822.parseaddr can handle.

Definition at line 162 of file smtplib.py.

163 def quoteaddr(addr):
164  """Quote a subset of the email addresses defined by RFC 821.
165 
166  Should be able to handle anything rfc822.parseaddr can handle.
167  """
168  m=None
169  try:
170  m=rfc822.parseaddr(addr)[1]
171  except AttributeError:
172  pass
173  if not m:
174  #something weird here.. punt -ddm
175  return addr
176  else:
177  return "<%s>" % m
def smtplib.quotedata (   data)
Quote data for email.

Double leading '.', and change Unix newline '\\n', or Mac '\\r' into
Internet CRLF end-of-line.

Definition at line 178 of file smtplib.py.

179 def quotedata(data):
180  """Quote data for email.
181 
182  Double leading '.', and change Unix newline '\\n', or Mac '\\r' into
183  Internet CRLF end-of-line.
184  """
185  return re.sub(r'(?m)^\.', '..',
186  re.sub(r'(?:\r\n|\n|\r(?!\n))', CRLF, data))
187 

Variable Documentation

list __all__
Initial value:
1 = ["SMTPException","SMTPServerDisconnected","SMTPResponseException",
2  "SMTPSenderRefused","SMTPRecipientsRefused","SMTPDataError",
3  "SMTPConnectError","SMTPHeloError","SMTPAuthenticationError",
4  "quoteaddr","quotedata","SMTP"]

Definition at line 51 of file smtplib.py.

string CRLF = "\r\n"

Definition at line 57 of file smtplib.py.

tuple fromaddr = prompt("From")

Definition at line 682 of file smtplib.py.

tuple line = sys.stdin.readline()

Definition at line 687 of file smtplib.py.

msg = ''

Definition at line 685 of file smtplib.py.

tuple server = SMTP('localhost')

Definition at line 693 of file smtplib.py.

int SMTP_PORT = 25

Definition at line 56 of file smtplib.py.

tuple toaddrs = prompt("To")

Definition at line 683 of file smtplib.py.