473,403 Members | 2,359 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,403 software developers and data experts.

Attachment Size and SMTP EMail

Hello All -

I am using python to send an email with a large zip file as an
attachment. I successfully sent a 52M attachment. If I try to send a
63M attachment or larger, the message never gets through. I do not
get any errors in my python code. I pasted my python code below.

from email.MIMEBase import MIMEBase
from email.MIMEMultipart import MIMEMultipart
from email import Encoders
import smtplib,os

mssg = MIMEMultipart()
part = MIMEBase('application',"octet-stream")
part.set_payload(open(zipFileName,"rb").read())
Encoders.encode_base64(part)
part.add_header('Content-Disposition', 'attachment; filename="%s"' %
os.path.basename(zipFileName))
mssg.attach(part)

s = smtplib.SMTP('localhost')
s.set_debuglevel(1)
s.sendmail(fromAddr,toAddr,mssg.as_string())
s.quit()

I am using a Fedora Core 6 system with python 2.4.4.

Any suggestions on what could be limiting the attachment size or how I
could troubleshoot this?

Thanks!
EricE
Sep 23 '08 #1
2 6813
On 2008-09-23, Eric E <er**********@gmail.comwrote:
I am using python to send an email with a large zip file as an
attachment. I successfully sent a 52M attachment. If I try
to send a 63M attachment or larger, the message never gets
through. I do not get any errors in my python code.
Does sending large attachements with other SMTP clients using
the same SMTP server work?

--
Grant Edwards grante Yow! Zippy's brain cells
at are straining to bridge
visi.com synapses ...
Sep 23 '08 #2
On Sep 23, 9:52 am, Grant Edwards <gra...@visi.comwrote:
On 2008-09-23, Eric E <eric.e.ja...@gmail.comwrote:
I am using python to send an email with a large zip file as an
attachment. I successfully sent a 52M attachment. If I try
to send a 63M attachment or larger, the message never gets
through. I do not get any errors in my python code.

Does sending large attachements with other SMTP clients using
the same SMTP server work?

--
Grant Edwards grante Yow! Zippy's brain cells
at are straining to bridge
visi.com synapses ...

I do not know for sure. I recently downloaded msmtp 1.4.16 and am
still in the process of trying to get it to work.
Sep 23 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: knoak | last post by:
Hi there, I've found a script at these great Google fora. a script to send emails with attachments. The script is below this message, name etc. aren't mine, but from the original post. My...
3
by: Sean Berry | last post by:
I have the sample script that uses the smtplib module that is available at python.org. How can I use this to send an attachment? Help is greatly appreciated. Thanks. --
3
by: Bart Stes | last post by:
Hey guys, I'm try to write a very simple winform app that allows the users to send an email. I use the System.Web.Mail MailMessage class for this. But when it comes to adding an attachment,...
1
by: Lelle | last post by:
Sorry for crossposting - sent to wrong group first hello ! does anyone have more information regarding this issue? http://www.systemwebmail.com/faq/2.3.aspx a.. Attachment Size Limit? ...
2
by: Guoqi Zheng | last post by:
Dear sir, I wrote my own component to send email (use tcpClient) instead of using ms ..net class... It works fine and I have full control during the mail sending procedure. However, my...
1
by: theWizard1 | last post by:
The following sends my email, but the attachment is empty. The attachment should contain the data that is in the string that was created from the xmlReader. I have a stored procedure written...
4
by: krishnakant Mane | last post by:
hello, I am a bit confused. I want to make a program that will take some data from a database and make a string of text. and send it to the respective email id of a person. next I also want to...
2
by: Erik Witkop | last post by:
So I have been trying to get this to work all day. I can't get a local file on my web server to attach to an email. Right now I have it printing out in the body of the email. Please help me with...
1
by: deepaks85 | last post by:
Dear All, I want to send some data through a form with Multiple attachment in an HTML Format. I have tried it but it is not working for me. I am able to send data without attachment but with the...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.