Gmail Error using smtplib
Tim Williams
tim at tdw.net
Fri Jul 20 08:44:22 EDT 2007
On 20/07/07, DJ Fadereu <fadereu at gmail.com> wrote:
> Hello, can anyone help me with this? What am I doing wrong here?
>
> (I've changed private info to yyyy/xxxxxx)
> I'm getting an authentication error while using a standard script
> Gmail:
> --------------------------SCRIPT-----------------------------
> import smtplib
> from email.MIMEText import MIMEText
>
> msg = MIMEText('Hello, this is fadereu...')
> >From = 'yyyyyyyy at gmail.com'
>
> msg['Subject'] = 'Hello'
> msg ['From'] = 'ccccccc at gmail.com'
> msg['To'] = 'fffd at xyz.com'
>
> s = smtplib.SMTP('alt1.gmail-smtp-in.l.google.com')
> s.set_debuglevel(1)
> s.login('yyyyyyyyy at gmail.com','xxxxxxxxx')
> s.sendmail(msg['From'], msg['To'], msg.as_string())
> s.close()
> ----------------------------ERROR------------------------------
> Traceback (most recent call last):
> File "C:\Documents and Settings\Acer User\Desktop\Code\S60 scripts
> \Fadereu's Codez\gmail.py", line 13, in <module>
> s.login('yyyyyyy at gmail.com','xxxxxxxxx'')
> File "C:\Python25\lib\smtplib.py", line 554, in login
> raise SMTPException("SMTP AUTH extension not supported by
> server.")
> SMTPException: SMTP AUTH extension not supported by server.
>
The error fairly self-explanitory :)
>>SMTPException: SMTP AUTH extension not supported by server.
In fact, you are trying to send outbound email through an inbound
email server. You need to use GMAIL's outbound server.
HTH :)
More information about the Python-list
mailing list