I would like to send email from a server running FreeBSD(TextDrive) to my gmail account to make a weekly backup of my customer's website. The attachment that I need to be able to send will be a tgz and will be around 15 MBs. What are my options for constructing and sending this mail via ruby?
Right now I am using PHPmailer for this job and it just isn't cutting it now that the attachment is over 10 MBs. I checked out RAA and didn't find anything that seemed to handle attachments well. Simplemail looked to be the most promising but it doesn't seem to play nice on my server, it just sat there eating up lots of resources.
Use tmail. I send multipart MIME mail with it all the time (many hundreds,
daily). I have a class that sits in front of it using Forwardable and
implements some extra help for building multipart email, but it's nothing
terribly tricky. Email me offlist and I'll send you a copy and tell you the
couple of places you'll want to change what I did to make it more general
purpose.
And again, if there might be other interest, I can do the same thing with this
that I offered to do with my Webcache class and make a release seperate from
IOWA out of it as a standalone mini-project.
Kirk Haines
···
On Sunday 07 August 2005 3:35 pm, Matthew Margolis wrote:
Right now I am using PHPmailer for this job and it just isn't cutting it
now that the attachment is over 10 MBs. I checked out RAA and didn't
find anything that seemed to handle attachments well. Simplemail looked
to be the most promising but it doesn't seem to play nice on my server,
it just sat there eating up lots of resources.
I would like to send email from a server running FreeBSD(TextDrive) to
my gmail account to make a weekly backup of my customer's website. The
attachment that I need to be able to send will be a tgz and will be
around 15 MBs. What are my options for constructing and sending this
mail via ruby?
I was hopting to show off something clever, but all I use is is 'metasend'.
The code below isn't complete, but it should give you an idea.
···
#
# Mail the output file as an attachment
#
def mail(addr, subject)
# no point if no address or records generated
if addr.nil? || @contact.length == 0 || @can_mail == false
return false
end
Keep in mind that Gmail only allows attachments up to 10Mb in size. So you will have to split it into 10Mb chunks and send multiple emails.
HTH
-Ezra Zygmuntowicz
WebMaster
Yakima Herald-Republic Newspaper
ezra@yakima-herald.com
509-577-7732
···
On Aug 7, 2005, at 2:35 PM, Matthew Margolis wrote:
I would like to send email from a server running FreeBSD(TextDrive) to my gmail account to make a weekly backup of my customer's website. The attachment that I need to be able to send will be a tgz and will be around 15 MBs. What are my options for constructing and sending this mail via ruby?
Right now I am using PHPmailer for this job and it just isn't cutting it now that the attachment is over 10 MBs. I checked out RAA and didn't find anything that seemed to handle attachments well. Simplemail looked to be the most promising but it doesn't seem to play nice on my server, it just sat there eating up lots of resources.
Kirk -
I would be interested to see those classes as a separate release. If you want you can contact me off list or keep it on list for other peoples benefit.
Thanks-
-Ezra Zygmuntowicz
WebMaster
Yakima Herald-Republic Newspaper
ezra@yakima-herald.com
509-577-7732
···
On Aug 7, 2005, at 3:05 PM, Kirk Haines wrote:
On Sunday 07 August 2005 3:35 pm, Matthew Margolis wrote:
Right now I am using PHPmailer for this job and it just isn't cutting it
now that the attachment is over 10 MBs. I checked out RAA and didn't
find anything that seemed to handle attachments well. Simplemail looked
to be the most promising but it doesn't seem to play nice on my server,
it just sat there eating up lots of resources.
Use tmail. I send multipart MIME mail with it all the time (many hundreds,
daily). I have a class that sits in front of it using Forwardable and
implements some extra help for building multipart email, but it's nothing
terribly tricky. Email me offlist and I'll send you a copy and tell you the
couple of places you'll want to change what I did to make it more general
purpose.
And again, if there might be other interest, I can do the same thing with this
that I offered to do with my Webcache class and make a release seperate from
IOWA out of it as a standalone mini-project.
Keep in mind that Gmail only allows attachments up to 10Mb in size. So you will have to split it into 10Mb chunks and send multiple emails.
HTH
-Ezra Zygmuntowicz
WebMaster
Yakima Herald-Republic Newspaper
ezra@yakima-herald.com
509-577-7732
I would like to send email from a server running FreeBSD(TextDrive) to my gmail account to make a weekly backup of my customer's website. The attachment that I need to be able to send will be a tgz and will be around 15 MBs. What are my options for constructing and sending this mail via ruby?
Right now I am using PHPmailer for this job and it just isn't cutting it now that the attachment is over 10 MBs. I checked out RAA and didn't find anything that seemed to handle attachments well. Simplemail looked to be the most promising but it doesn't seem to play nice on my server, it just sat there eating up lots of resources.
Thank you,
Matthew Margolis
Was this implemented in the last month or two? I have 11MB attachments that I have sent through gmail.
Thank you,
Matthew Margolis
···
On Aug 7, 2005, at 2:35 PM, Matthew Margolis wrote:
I am not quite sure what you are saying here. I am already using tar via a system call in my ruby script. I don't have a local box that I can just download the file to as I want to automate the process and I have a laptop that is not always on. From what I understand rsync doesn't do incremental backups and this is what I need, a tared file representing the state of the site every week. And no I can't use subversion as the client doesn't want restoring the backup to be dependent on the host at all.
Keep in mind that Gmail only allows attachments up to 10Mb in size. So you will have to split it into 10Mb chunks and send multiple emails.
HTH
-Ezra Zygmuntowicz
WebMaster
Yakima Herald-Republic Newspaper
ezra@yakima-herald.com
509-577-7732
I would like to send email from a server running FreeBSD(TextDrive) to my gmail account to make a weekly backup of my customer's website. The attachment that I need to be able to send will be a tgz and will be around 15 MBs. What are my options for constructing and sending this mail via ruby?
Right now I am using PHPmailer for this job and it just isn't cutting it now that the attachment is over 10 MBs. I checked out RAA and didn't find anything that seemed to handle attachments well. Simplemail looked to be the most promising but it doesn't seem to play nice on my server, it just sat there eating up lots of resources.
Thank you,
Matthew Margolis
Was this implemented in the last month or two? I have 11MB attachments that I have sent through gmail.
Thank you,
Matthew Margolis
Nevermind I found the blurb on gmail's site. I guess I am going to need to figure out a new backup system.
-Matthew Margolis
···
On Aug 7, 2005, at 2:35 PM, Matthew Margolis wrote:
Mathew-
You can still do this with gmail. You just need to split the tar.gz file into 10MB chunks. If you are on linux or OSX have a look at $ man split. You can make the tar.gz backup of the whole htdocs folder and then run it through split which can split it up into 10Mb chunks then loop through and attach one chunk to each email until the whole backup is complete. Then when you need to restore a backup you just append the chunks together and untar/gzip just like normal. Let me know how you come along on this script as I could use something similar. Actually why don't you contact me off list and we can work together to make this script? I'm sure some poeple would find it useful and we can post it back to the list here once it is finished.
HTH-
-Ezra Zygmuntowicz
Yakima Herald-Republic
WebMaster
509-577-7732
ezra@yakima-herald.com
···
On Aug 8, 2005, at 6:41 AM, Matthew Margolis wrote:
Matthew Margolis wrote:
Ezra Zygmuntowicz wrote:
Keep in mind that Gmail only allows attachments up to 10Mb in size. So you will have to split it into 10Mb chunks and send multiple emails.
HTH
-Ezra Zygmuntowicz
WebMaster
Yakima Herald-Republic Newspaper
ezra@yakima-herald.com
509-577-7732
On Aug 7, 2005, at 2:35 PM, Matthew Margolis wrote:
I would like to send email from a server running FreeBSD(TextDrive) to my gmail account to make a weekly backup of my customer's website. The attachment that I need to be able to send will be a tgz and will be around 15 MBs. What are my options for constructing and sending this mail via ruby?
Right now I am using PHPmailer for this job and it just isn't cutting it now that the attachment is over 10 MBs. I checked out RAA and didn't find anything that seemed to handle attachments well. Simplemail looked to be the most promising but it doesn't seem to play nice on my server, it just sat there eating up lots of resources.
Thank you,
Matthew Margolis
Was this implemented in the last month or two? I have 11MB attachments that I have sent through gmail.
Thank you,
Matthew Margolis
Nevermind I found the blurb on gmail's site. I guess I am going to need to figure out a new backup system.