From 510db4decd2a4db190ebb5d2a541bfd26b272ac1 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Tue, 17 Sep 2002 20:46:08 +0000 Subject: Don't double @. svn path=/trunk/; revision=3724 --- torturetest.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/torturetest.py b/torturetest.py index 48bf4881..9f5d86cc 100755 --- a/torturetest.py +++ b/torturetest.py @@ -63,7 +63,10 @@ class TestSite: "Send test mail to the site." server = smtplib.SMTP("localhost") fromaddr = "esr@thyrsus.com" - toaddr = "%s@%s" % (self.mailname, self.host) + if string.find(self.mailname, "@") > -1: + toaddr = self.mailname + else: + toaddr = "%s@%s" % (self.mailname, self.host) msg = ("From: %s\r\nTo: %s\r\n\r\n" % (fromaddr, toaddr)) if n != None: msg += `n` + ": " -- cgit v1.2.3