Administrative prohibition error when sending email

L

Lad

I use a new webhosting provider and I can not send an email from my
script.
This is the script that I use to test the connection

#######################
import smtplib,poplib,

#I first login to my POP3 account
M=poplib.POP3('www.mywebh.com')
M.user('MYWeb)
M.pass_('12345')
print M.pass_ #check if you login successfully

#next send a message
fromaddr = "(e-mail address removed)"
toaddrs = "(e-mail address removed)"
msg="This is a test"
server = smtplib.SMTP('www.ebayworldstuff.com:25')

server.set_debuglevel(1)
server.sendmail(fromaddr, toaddrs, msg)
server.quit()
#########################

It ends with SMTP error 550: Administrative prohibition

Where can be a problem?
Lad.
 
L

Lad

I solved the problem. The reason was uncomplete email message
msg should be like this

timezone = ' %+03d%02d' % (-time.timezone/3600, time.timezone%3600)
MessageSubject="This is a subject"
BodyMessage="This is a body"
msg='From: '+fromaddr+' <'+fromaddr+'>\nTo:
'+toaddrs+'<'+toaddrs+'>\nDate: '+ time.strftime('%a, %d %b %Y
%H:%M:%S', time.localtime(time.time()))+timezone+'\nSubject:
'+MessageSubject+'\nReply-to: '+toaddrs+'\nX-Mailer: Microsoft Outlook
Express 5.50.4133.2400\n\n'+BodyMessage
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top