Hi Rob,

Rob wrote:
> Hi, can someone help me interpret the error output below?
>  
> I can't tell whether this is a coding error, or a configuration error,
> in which case, it would be up to my host provider.
>  
> For privacy reasons, I have changed the actual email addresses to
> [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> and [EMAIL PROTECTED]
> <mailto:[EMAIL PROTECTED]>.  The first was the recipient and the second
> was the sender.
>  
> Thanks in advance.
> -- Rob
>  
>  
> SMTPRecipientsRefused
> Python 2.3.5: /usr/bin/python
> Wed Aug 2 20:17:33 2006
>  
> A problem occurred in a Python script. Here is the sequence of function
> calls leading up to the error, in the order they occurred.
>  
>  
>    62 
>    63     server = smtplib.SMTP(mailserver)
>    64     failed = server.sendmail(From, To, text)
>    65     server.quit() 
>    66     if failed:
> failed undefined, server = <smtplib.SMTP instance>, server.sendmail =
> <bound method SMTP.sendmail of <smtplib.SMTP instance>>, From =
> '[EMAIL PROTECTED]' <mailto:'[EMAIL PROTECTED]'>,
> To = '[EMAIL PROTECTED]' <mailto:'[EMAIL PROTECTED]'>, text = 'From:
> [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>: [EMAIL PROTECTED]
> <mailto:[EMAIL PROTECTED]>... 1 1
> \n----------------------------------------\n'
>  
>  
> /usr/lib/python2.3/smtplib.py
>  in sendmail(self=<smtplib.SMTP instance>, from_addr='[EMAIL PROTECTED]'
> <mailto:from_addr='[EMAIL PROTECTED]'>, to_addrs=['[EMAIL PROTECTED]'],
> msg='From: [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>:
> [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>...
> 1 1 \n----------------------------------------\n', mail_options=[],
> rcpt_options=[])
>   685             # the server refused all our recipients
>   686             self.rset()
>   687             raise SMTPRecipientsRefused(senderrs)
>   688         (code,resp) = self.data(msg)
>   689         if code != 250:
> global SMTPRecipientsRefused = <class smtplib.SMTPRecipientsRefused>,
> senderrs = {'[EMAIL PROTECTED]' <mailto:{'[EMAIL PROTECTED]'>: (550,
> 'authentication required')}
>  
> SMTPRecipientsRefused: {'[EMAIL PROTECTED]' <mailto:{'[EMAIL PROTECTED]'>:
> (550, 'authentication required')}
>       args = ({'[EMAIL PROTECTED]' <mailto:{'[EMAIL PROTECTED]'>: (550,
> 'authentication required')},)
>       recipients = {'[EMAIL PROTECTED]' <mailto:{'[EMAIL PROTECTED]'>:
> (550, 'authentication required')}
> 

I've not worked with smtplib, but the error (550, 'authentication required'), 
suggests
to me, that you have to login into the mail-Server, otherwise the server would 
not
accept emails.
Looking into the doc for smtplib, the Class SMTP has method for that:

login(self, user, password)
    Log in on an SMTP server that requires authentication.

    The arguments are:
        - user:     The user name to authenticate with.
        - password: The password for the authentication.

    If there has been no previous EHLO or HELO command this session, this
    method tries ESMTP EHLO first.

    This method will return normally if the authentication was successful.

    This method may raise the following exceptions:

     SMTPHeloError            The server didn't reply properly to
                              the helo greeting.
     SMTPAuthenticationError  The server didn't accept the username/
                              password combination.
     SMTPException            No suitable authentication method was
                              found.


HTH Ewald

_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to