Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8525573
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T08:01:12+00:00 2026-06-11T08:01:12+00:00

I have a simple xmlrpc server setup to start a SMTP server, the code

  • 0

I have a simple xmlrpc server setup to start a SMTP server, the code is here:

from SimpleXMLRPCServer import SimpleXMLRPCServer
import smtplib

# Create server
server = SimpleXMLRPCServer(("localhost", 1025), allow_none = True)

# add the introspection functions (system.listMethods, system.methodHelp 
# and system.methodSignature)
server.register_introspection_functions()

def send(host, port):
    server = smtplib.SMTP((host, port), None)

# register this method
server.register_function(send, 'send')

# start server
server.serve_forever()

I start this server and on the client side I perform the following steps:

import xmlrpclib
s = xmlrpclib.ServerProxy('http://localhost:1025')
s.send('0.0.0.0',25)

which result in the following error I do not understand:

xmlrpclib.Fault: <Fault 1: "<type 'exceptions.AttributeError'>:'tuple' object has no attribute 'find'">

What tuple object is meant here? Why does the code require an attribute find? Any ideas that help me to get this code working, i.e. that I am able to make a xmlrpc request to initialize (and later use) a smtp server inside the xmlrpc server?

Thanks
Alex

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T08:01:14+00:00Added an answer on June 11, 2026 at 8:01 am

    In the smtplib documentation it’s stated the the signature of the SMTP class accepts two distinct parameters for host and port.

    Thus you should define your send function in this way:

    def send(host, port):
        server = smtplib.SMTP(host, port)
    

    Probably the SMTP constructor expects a string as host, and uses the find method.
    But if you pass in the tuple (host, port) then that AttributeError is generated.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have simple xmlrpc server code: from SimpleXMLRPCServer import SimpleXMLRPCServer port = 9999 def
I already have a very simple threading XML-RPC server in Python: from SocketServer import
I have simple table in Sybase -- Creating table 'SimpleText' CREATE TABLE [dbo].[SimpleText] (
I have a SimpleXMLRPCServer server (Python). How can I get the IP address of
I have simple code: <?php error_reporting(E_ALL); ini_set('display_errors', true); ini_set('html_errors', false); $test = array(); $test
I have simple CI (CodeIgniter) code. what I want to do is: when I
I have simple node js http server. var http = require(http); http.createServer(function(request, response) {
So I have a simple xml-rpc server (xml over http) provided to me to
Standard libraries ( xmlrpclib + SimpleXMLRPCServer in Python 2 and xmlrpc.server in Python 3)
Have simple , empty project without any code. just includes. The include linux/netfilter.h cause

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.