1821052 Members
2451 Online
109631 Solutions
New Discussion юеВ

Fastmail PDF's

 
filip_6
Occasional Advisor

Fastmail PDF's

Hello

We send mails from unix via fastmail where we attach pdf files. This works perfectly. In outlook clients we can see the pdf attached and can open it. Perfectly.

But ..

When we send the mail to non-outlook clients, like webmail or others, there is no attachment.

In the body of the mail there is
"begin 744 Document_Name.pdf
@#{@#{@#{@#{ .....
end"

So its clear the pdf file is translated in outlook, but not in other mail clients.

Can this be fixed somehow ?

To attach the pdf to the unix mail, we first perform a uuencode wherefrom the output it send to a email.msg file. This email.msg is send via fastmail.

Hope you can help me out.

Thanks.

Filip
8 REPLIES 8
Vibhor Kumar Agarwal
Esteemed Contributor

Re: Fastmail PDF's

What's the size of pdf files.

Webmails have a size restriction of 1-5MB.
Vibhor Kumar Agarwal
filip_6
Occasional Advisor

Re: Fastmail PDF's

I tested with small pdf files (< 5mb)

I noticed the same in the Tobit mailer where also the "begin .." is in the body.

Its not only on webmail unfortunately
Andrew Merritt_2
Honored Contributor

Re: Fastmail PDF's

It sounds as though in the non-Outlook case you are seeing the
"begin 744 Document_Name.pdf
@#{@#{@#{@#{ .....
end"

in the body of the mail. I think that what is happening is that Outlook is recognising the encoded attachment by scanning the text. It's actually in violation of the mail standards in doing this.

For the attachment to be recognisable by standard mail clients, you need to attach the file using a MIME mailer, or include the correct uuencode headers to describe the attachement (sorry, it's a long while since I've done this, so can't give you the details now).

What do you mean by 'fastmail'? Is it the web-based email service or something else?

The mail client should give you a way to attach a file, these days you shouldn't need to build uuencoded files by hand. If you're just including the uuencoded data in the body of the text with no description, which is what it sounds like, that's the explanation for what is happening.

Andrew
Steven E. Protter
Exalted Contributor

Re: Fastmail PDF's

My second post in this thread:

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=728148

Contains a script called mailfile

mailfile is a sendmail script that correctly sends attachments according to standards.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
filip_6
Occasional Advisor

Re: Fastmail PDF's

fastmail is a unix mailer. We perform the following commands from the prompt to send a mail:

1.Uuencode the pdf file :
server /filip $ uuencode pdffile.pdf pdffile.pdf > mail.msg

mail.msg contains some text "Hello ..." in the body and now also the uuencoded pdf-file.

2.Mail the message
server /filip $ fastmail -F "from@domain.com" -f "Filip" -s "Subject" mail.msg adressee@domain.com

I dont know which uuencode header i should include and how.

I cant download the mail script. Dont think i can use this script in the way we are sending our mails (from the prompt), right ?

Thanks.
Andrew Merritt_2
Honored Contributor

Re: Fastmail PDF's

Ah, Ok, just found the man page for fastmail (part of elm).

I think that fastmail is too simple for what you want to do, as it doesn't allow for any attachments and won't add any headers describing the contents. You are just lucky that the MS client is flouting the standards and picking out the uuencoded attachment by scanning the text.

You need either a mail client with an interface that allows you to specify an attachment, or need to create the complete encoded message and pipe that in to, e.g., sendmail.

One example of the former, which I just found using google (I have no experience of it) is at http://email.cleancode.org. With this you just do:
email -s "Attachment" -a coolpic.jpg user@domain.com

You can also redirect text:

email -s "Attachement" -a coolpic.jpg user@domain.com < somefile

You can send an empty email with just the attachment:

email -s "Attachment" -a coolpic.jpg -b user@domain.com


For the second, you'd need a tool like 'mmencode' in the metamail package and pipe the output to sendmail.

Several other answers can be found at http://www.panix.com/~kylet/unix-att.html

UUDeview (http://www.fpx.de/fp/Software/UUDeview/) from that page seems the closest to what you are currently trying, using uuencode, but using MIME gives more flexibility.

Hope this helps,
Andrew
Andrew Merritt_2
Honored Contributor

Re: Fastmail PDF's

So, were any of the answers above any help? If so, please assign points to them indicating this. If not, again, please assign points appropriately, and let us know if you still are looking for answers.

The points enable other people to find solutions to problems that have been previously encountered, as well as acknowledging the help given by the contributors here.

Andrew
filip_6
Occasional Advisor

Re: Fastmail PDF's

Hello

Sorry for the late reply. I've let this problem for what is was for a while.

I've done some research and i've given up to try to let fastmail mail pdf attachments.

I must go with the mime way. Herefor i'm trying to use elm. I'm looking for these functions in elm :

Define the "From" Name
Define the "From" emailadres
Define the BCC
Define the Reply-to
Define the subject (no problem)
Define some body text
Attach a pdf file

I've found the following suggestion so far

# export REPLYTO=me@domain.com
# echo "[include /pdffile.pdf application/octet-stream base64]" |
elm -s "test" me@domain.com