Programming :: Perl - Save An E-mail Attachment On Disk Keeping The "&" Character - No "%26"

Feb 25, 2010

I'm working on a Perl script that handles e-mails and attachments using MIME::Tools.

This script saves the attachments on filesystem, but whenever it finds an "&" (ampersand) into the filename (the filename is given by the "path" method of the "MIME::Body" class), it is changed into "%26" and then stored on disk.

To make an example, if an attachment is named "You & me.pdf", it is saved on disk as "You %26 me.pdf".

I also tried to change that char with a regexp and setting again the path passing the new (and working) value as a parameter to the "path" method, and if I print the value it is right, but on the filesystem is *always* stored with the "%26" string.

View 5 Replies


ADVERTISEMENT

Programming :: Mail Attachment Using The Perl?

Feb 28, 2010

My script collects information and writes it to a xls file and should mail it across. I tested the first part of the script which writes the excel file , it does write the excel file fairly with expected data using Spreadsheet::WriteExcel module Second part uses MIME::Lite , All I get is a mail with intended subject intact but without the attachment . Following is the code , I have googled and tried out many options , didn't go any further apart from receiving a mail without attachment.

use MIME::Lite;
$msg = MIME::Lite->new(
From => 'xx',
To => 'xx',

[code]...

I am using RHEL 4 , Perl 5.8

View 5 Replies View Related

General :: Delete Attachment I Received While Keeping Rest Of Body Of That Mail?

Aug 18, 2010

I have ubuntu 10.04 on my HP Compaq laptop, and use evolution mail. Is there a way to delete an attachment I received, while keeping the rest of the body of that mail?

View 4 Replies View Related

General :: Extract/save A Mail Attachment Using Bash?

Sep 10, 2010

Using normal bash tools (ie, built-ins or commonly-available command-line tools), is it possible, and how to extract/save attachments on emails?

For example, say I have a nightly report which arrives via email but is a zip archive of several log files. I want to save all those zips into a backup directory. How would I accomplish that?

View 3 Replies View Related

Software :: Convert Email Files With Attachment To Save As Attachment File?

Apr 7, 2011

I finally got E-mails fetched downloaded to local disk, now a further thing that I would like to do is to rip off the attachments to save as its original file name and extension.A E-mail like this for example:

Code:

From root Thu Apr 7 17:21:34 2011
Delivered-To: ted_chou12@tedchou12.cz.cc
Received: from pop.gmail.com [74.125.155.109]

[code]...

View 2 Replies View Related

Programming :: Perl Regular Expression To Change Character

May 26, 2009

Part of a perl script I am writing need to change the character at an index to upper case. Now i am new to perl and i am having some trouble getting it to do it. In c++ i would do something like

Code:

Now from what i understand the same thing is possible in perl using regular expressions. But i cant get it to work.

View 2 Replies View Related

Programming :: Perl Match Character - Random Sentence Generator ?

Aug 11, 2010

I am trying to make a random sentence generator in perl. So far I can loop it x times to make a fixed quantity of words, but I don't want to do that. Or I can let it go on until I hit ctrl-C :/

I want to have it so that when it reaches a word with a sentence terminating punctuation mark it stops.

My attempt to do that was with:

This is doing the woooosh text until ctrl-C thing...

Now however I am not sure how I can cut off everything after the punctuation mark (when it exists).

View 1 Replies View Related

Programming :: Perl Only Matching Single-character Regex Patterns?

Jan 20, 2009

I'm having a small issue with regex matching in Perl. I'm pretty certain it's a simple fix, but it all looks correct to me...

If I run the following:

Code:

It prints out all the lines containing a 'P', as one would expect. But when the regex is

Code:

I get zero lines printed. It seems to match only single-character patterns.

The file I'm reading is: (It has the same effect whether I leave it with Windows linebreaks or convert them to unix).

Code:

View 3 Replies View Related

Server :: Send Mail From Unix Mail Command To Yahoo-id With Attachment?

Feb 15, 2010

i want to send mail from unix mail command to my yahoo-id with attachment, but i want to receive it as attachment.

View 1 Replies View Related

General :: Debian Mail Server As A User Send A Mail With Attachment Maximum Wight Is 5 Mb

Jun 8, 2011

How to configure a Debian mail server as a user send a mail with attachment maximum wight is 5 Mb.

View 3 Replies View Related

Programming :: How To Save Mail To Folder

Jul 18, 2011

I am an avid user of gmail. Recently I have been receiving some important e-mails, and I want to download only those e-mails from that specific person to a folder.

View 1 Replies View Related

Programming :: Sending Mail To Mailing-lists In Perl?

Jan 25, 2011

Im creating a perl script that will be sending out mail to mailing-lists, but im not getting it to work. Its no problem getting the script to send mail to regular mail addresses, but it doesnt seem to handle to send mail to mailing lists. Im using the Net::SMTP perl module.how to send mail from a perl script to a mailing list (and not just regular mail addresses) ?

View 2 Replies View Related

General :: Can Attachment Sends Through Mail Command

Nov 3, 2010

how can attachment sends through mail command in linux with mail command either with mail -s or -v option also please confirm how to download the attachments from it . and how one should knows with mail command that attachment is present with the particular mail

View 4 Replies View Related

Server :: Unable To Forward A Mail With Attachment?

Feb 26, 2011

im unable to forward a mail with attachment my problem is as below cat /root/data|mail -s "subject" [URL] its not forwarding mail and not throwing any error my attached file is more than 100MB ,will any one me with correct syntax how much length of file can be attached maximum i also tried like this mail -s "subject" [URL] < /root/data its also not working

View 2 Replies View Related

Server :: Web Mail Show Attachment As Winmail.dat?

Aug 2, 2010

user can not see the correct file attachment in web mail which showed "winmail.dat" but works fine after downloaded to outlook. and the email is sent from microsoft outlook in "HTML" format(not RTF format). Any one could give me a solution figure it out, because there is quite a lot of user in my company have to use web mail and got this winmail.dat problem

View 1 Replies View Related

Software :: Mail Processing - Converting Attachment File Names

Oct 22, 2010

I'm running a blog on posterous. Some friends of me post messages there via mail, mostly with some PDF attachments. These PDFs are generated mostly on a MAC with Word. The standard extension of these files is foobar.doc.pdf. Unfortunately, Posterous ignores attachments with the extension .doc.pdf.

So, I'm looking for some workaround. For example, I could my web server with some script, which receives these mails, converts the filenames of the attachment in some way and posts the result to my posterous blog. Therefore I'm looking for some mail processing scripts, which enable me to do so.

View 2 Replies View Related

Red Hat :: Discard Outgoing Mail In Postfix That Have Some Specific Content In Attachment?

Jul 30, 2010

Working in a SW company. guys transfer their codes through email outside the company. mailserver running on postfix. Is there any method to filter mails according to contents of attachment not by file extension.

View 3 Replies View Related

Server :: Send A Mail From Blackberry Device With A JPEG Attachment, And Have It Forwarded As A Fax To The Recipient Fax Machine?

Apr 25, 2010

I managed to get my hylafax server nice and going, I also setup up AvantFax and Faxy to reach it from the web..What I still want to do it to send a mail from my blackberry device with a JPEG attachment, and have it forwarded as a FAX to the recipient fax machine...

I read and saw a few documentation here and there, but it is very confusing for me...

courier-faxmail seemed nice, but it conflicts with Hylafax..

Hylafax help support is unclear to me...

I'm not sure jpg attachments from blackberry are "standard" jpg, and, I have no idea how to forward this as a fax...

For what I understood, I need to have a running mail agent on my server, and a script to forward this to hylafax..

View 2 Replies View Related

Server :: Sendmail Isn't Sending Mail For Some Reason And Keeping It In The Queue

May 14, 2011

Sendmail isn't sending mail for some reason and keeping it in the Queue. I attemped to flush them but it deferres the connection to the server in which it is trying to relay the message to. I have checked to see if there is a DNS error or anything like that. I attemped to flush the messages through webmin.

This is the result.

Code:

I am not finding anything in the logs to let me know their is an error. I can ping the mail servers that it is trying to send to. Now it has started delaying when ping MX servers. So I knew something was starting to mess with it. I have checked the /etc/hosts. It is correct. The server isn't black listed. Mail to root just gives me.

Code:

View 2 Replies View Related

General :: Use The Man / Info / Apropos Pages - Character Instructed The Shell To Interpret A Special Character As An Ordinary Character?

Mar 27, 2010

1.What character instructd the shell to interpret a special character as an ordinary character?

2.What directory contains some of the utilities available on the system in the form of binary files?

3. What command is used to search the location of a utility?

4. What command is used to instruct the editor to write the file and quit the editor?

5. What key quits the more utility and displays the shell prompt?

6. What command starts a child shell as the super user, taking on root's identity and environment?

7. Which wildcard characters can be used for searching all the files in the system that start with "A"?

8. The user name or login name of the super user is????

[Code]....

View 10 Replies View Related

Software :: Spam / Virus Block - Unblock Email With Attachment .zip Should Be All Attachment Through To Email?

Jul 5, 2011

how to unblock email with attachment .zip should be all attachment through to my email i have below message when people sent me email to my domain

Warning: This message has had one or more attachments removed
Warning: (the entire message).
Warning: Please read the "Apex-Attachment-Warning.txt" attachment(s) for more information.

This is a message from the MailScanner E-Mail Virus Protection Service The original e-mail message contained potentially dangerous content, which has been removed for your safety. The content is dangerous as it is often used to spread viruses or to gain personal or confidential information from you, such as passwords or credit card numbers.

View 9 Replies View Related

Ubuntu :: Locating Mail - Perl Script For FetchYahoo?

Jun 18, 2010

New Ubuntu user here switched from Windows to Linux. I finally was able to install a program that allowed me to forward my pop3 to Evolution mail so that I have easy access to my emails. However, once I ran the Perl script for fetchyahoo, it asked me what the path was on the system for my mail spool or mailbox. Where exactly is my spool or mailbox for Evolution so that I can get my Yahoo! mail into the client? I have the free version of Yahoo, so I am trying to use fetchyahoo in the hopes that I can circumvent Yahoo's no-pop policy for free users. Found a mail location that I was able to get Evolution's mail client to look for emails in. Still having nightmares getting fetchyahoo to run properly, however. This is a mildly infuriating process.

View 2 Replies View Related

Programming :: SED - Keeping Start Of Line, But Drop The End?

May 3, 2010

I have a script that writes the following type lines to a file. The lines include some html tags. Here is an example:<p>Total = 5</h2></b></center>I want to keep the <p> tag, but remove the ending 3 tags. Sometimes the line can have a 1, 2, or perhaps a 3 digit Total. So I could have a Total = 125.Anyway, after the removal of the ending tags the result would be:<p>Total = 5There are some lines in the file that end with </h2></b></center> that I want to keep. These lines looks generally like this:

<p><b><center><h2>Events Summary for Sun May 02 2010</h2></center></b>

As you can see I am using sed to change the beginning and end of lines to make a very simple web page.The file actually displays ok in a browser with the extra tags on the end, but it is just sloppy work to have these unneeded tags in the output file.

View 2 Replies View Related

Programming :: Basic PHP Mail Function \ Say 'and If 'email' Is Not Equal To 0 Then Send The Mail?

Sep 9, 2010

this is my code at the moment

PHP Code: <?php
if (isset($_REQUEST['email'])) && $_REQUEST['email']!='0'{
$to = "chrisathisemail";

[code]....

View 5 Replies View Related

CentOS 5 Server :: Postfix Save Mail Before Relying It To Exchange?

Jan 29, 2010

I have postfix setup right now and it's relying mail to our Exchange server fine. What i would like to do though is have postfix save the email that gets passed through so that if a manager deletes an email, it's easy to look through by date and find the email he's looking for. Well, I'm thinking it would be a lot easier then having to need to pull out the backup tape and try to recover one email. Does anyone know whether I would be able to accomplish this?

View 3 Replies View Related

Programming :: Use Javamail For A Project To Send Mail Rather Than Using 'mail' Or 'mailx'

Nov 30, 2010

Was told that I need to use Javamail for a project to send mail rather than using "mail" or "mailx". Has anyone here done this?Any pointers or sites you've used and can recommend?

View 1 Replies View Related

Programming :: Rename Files Recursively, Only Keeping Last X Digits Plus Extension?

Nov 29, 2009

My problem is this:I have a number of directories, all containing files of different name lenghts, including letters, numbers and possibly spaces. I want to recursively rename all of these files, so that only the _last_ 5 digits (not counting the extension) remain. In other words: I want to cut off all but the last 5 digits and not touch the extension.

I've tried to read up on tr, rename (perl version), sed, cut etc. and browsed through some threads here, but so far couldn't quite figure out how to do it.

If someone could point me to the right (standard) CLI tools and syntax.

View 2 Replies View Related

Ubuntu Servers :: Save All Of The Mail Sendmail Processes To A Named Pipe?

Apr 12, 2010

how I could save all of the mail sendmail processes to a named pipe?

View 5 Replies View Related

OpenSUSE Network :: Mail Server Configuration - Postfix To Send Incoming Emails To A Php Script Or Perl

Aug 13, 2010

I have a server with a domain running and im trying to resolve the mail server but i can't see where to start. I use OpenSuse 11.2. Basically, for starting, i want postfix to send incoming emails to a php script or perl. for outgoing emails i guess that i could use php mail function and i will see what else to have. I configured the dns. I do a dig.mydomain.tld MX and i get the following:

mydomain.tld3600INMX0 mail.mydomain.tld
mail.mydomain.tld 3600INAmyNumericalIp

So now my system is receiving MX content but i dont know what to do.

View 9 Replies View Related

Programming :: How To Remove The Last Character

Jun 27, 2010

I have a string like this "/home/test/filename.txt" and i want to delete all character after the last "/". how to do that using sed or awk.

View 5 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved