473,657 Members | 2,430 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.MIMEMulti part import MIMEMultipart
from email import Encoders
import smtplib,os

mssg = MIMEMultipart()
part = MIMEBase('appli cation',"octet-stream")
part.set_payloa d(open(zipFileN ame,"rb").read( ))
Encoders.encode _base64(part)
part.add_header ('Content-Disposition', 'attachment; filename="%s"' %
os.path.basenam e(zipFileName))
mssg.attach(par t)

s = smtplib.SMTP('l ocalhost')
s.set_debugleve l(1)
s.sendmail(from Addr,toAddr,mss g.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 6929
On 2008-09-23, Eric E <er**********@g mail.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.co mwrote:
On 2008-09-23, Eric E <eric.e.ja...@g mail.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
3182
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 questions are: - Is this script extra heavy for a server, or should it be no problem?
3
4685
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
1620
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, something appears to go wrong. After I execute the following code, the MailMessage appears to have an attachment (looked it up through a watch in debug mode), but when I actually send the message, the attachment is not send along with it. So the...
1
2518
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? I am using SMTP Mail Service running under IIS on win2k server to send word/excel/pdf/etc files as attachments from several in house applications
2
1086
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 question is that how can I send attachment??? Any code example, tutorial?
1
5892
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 using For XML explicit, and it returns an xml reader. Then the following: xmlRdr.MoveToContent(); string myTemp = xmlRdr.ReadOuterXml();
4
3091
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 send an attachment of a photo along with the email. I will be required to make this program run on windows xp. can some one guide me as to how I can achieve this? what I will need on windows to send emails? I believe yahoo, gmail, rediff and msn...
2
4283
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 any thouhgts on how to get it in as an attachment. CODE: <?php ini_set(SMTP, "172.18.1.65");
1
3203
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 code for attachment, I am not able to send anything. I get blank email. Can you please help me on this? Here is the html form:
0
8823
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8503
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8603
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6163
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5632
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4151
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4301
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2726
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1604
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.