Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

OS X Mail, Mime::Lite and Net::SMTP

Status
Not open for further replies.

ManagerJay

IS-IT--Management
Jul 24, 2000
302
US
Ladies and Gentlemen,

I have previously posted this question in the Mac OS X forum, but after more testing, I do not believe it is a problem with my Mac, but rather a programming mistake I have made. So, please excuse the cross posting.

Each evening, I have a server which sends me a copy of the proxy server logs for the previous day. I am using Mime::Lite and Net::SMTP to accomplish this.

The script I am using is a copy of the script at with my attachment name inserted.

When viewing the mail in Mac OS X Mail, I see the following.

------=_NextPart_000_19CF17_01C82742.EBB756E8
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
charset=US-ASCII
Content-Disposition: inline

Attached are the proxy server logs for the previous 12 hour period.

------=_NextPart_000_19CF17_01C82742.EBB756E8
Content-Transfer-Encoding: base64
Content-Type: application/exe;
name=Proxy_logs.csv
X-Apple-Content-Length: 236564
Content-Disposition: attachment;
filename=Proxy_logs.csv


------=_NextPart_000_19CF17_01C82742.EBB756E8--

The e-mails display correctly in OWA and Outlook.

Any suggestions would be greatly appreciated.

Thanks,


Jay
 
Suggestions about what? Is there a problem of some sort?

------------------------------------------
- Kevin, perl coder unexceptional! [wiggle]
 
Looks like you're missing some content header that Mac OSX Mail is expecting, and Outlook or OWA is more forgiving in that it will default to a particular one, when the information is not forthcoming.

You don't happen to have 'view headers' enabled in MAcOSX mail by any chance?

Paul
------------------------------------
Spend an hour a week on CPAN, helps cure all known programming ailments ;-)
 
Here are a copy of the headers from the mail message.
Code:
From:   test1@test2.org
Subject: St. Charles Proxy Server Logs
Date: November 14, 2007 9:48:11 PM CST
To:   test1@test2.org
X-Mimeole: Produced By Microsoft Exchange V6.5
Received: from mail.test2.org ([10.129.10.45]) by mo-hq-s1.mo.loc with Microsoft SMTPSVC(6.0.3790.1830); Wed, 14 Nov 2007 21:54:57 -0600
Received: by mail.test2.org (Postfix, from userid 10071) id 1A5C03F4D2; Wed, 14 Nov 2007 21:54:56 -0600 (CST)
Received: from localhost.localdomain (unknown [10.129.10.102]) by mail.test2.org (Postfix) with ESMTP id 76D963F4CB for <test1@test2.org>; Wed, 14 Nov 2007 21:54:36 -0600 (CST)
X-Spam-Checker-Version: SpamAssassin 3.1.6 (2006-10-03) on mail.test2.org
X-Spam-Level: 
X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,HTML_00_10,HTML_MESSAGE,HTML_MIME_NO_HTML_TAG,MIME_BASE64_NO_NAME,MIME_HTML_ONLY,NO_REAL_NAME autolearn=no version=3.1.6
Content-Transfer-Encoding: binary
Content-Type: multipart/mixed; boundary="----=_NextPart_000_19CE35_01C8273B.6B1E11C6"
Mime-Version: 1.0
X-Mailer: MIME::Lite 3.01 (F2.74; B3.07; Q3.07)
Message-Id: <20071115035436.76D963F4CB@mail.test2.org>
Return-Path: <test1@test2.org>
X-Originalarrivaltime: 15 Nov 2007 03:54:57.0164 (UTC) FILETIME=[499D04C0:01C8273B]

The only thing I am seeing, and I don't know much about mime, is the boundary is listed as ---- and I am seeing ------ before the boundary markers.

Thanks for your help.



Jay
 
What do you get if send a regular email from outlook through Exchange to OSX Mail?

Try Thunderbird as well.

The fact that the mail is getting through leans towards the fact that the script is working, and I see some Apple specific headers in there as well. So it could be down to how the OSX Client receives mail from your exchange server. Do you have a 'traditional' SMTP Server that you could try to bounce the mails off?

Paul
------------------------------------
Spend an hour a week on CPAN, helps cure all known programming ailments ;-)
 
Sending an e-mail from Outlook through Exchange to OS X Mail works fine. Yes, I do have a traditional SMTP server I can try.

I am expirementing with chaning the Type with Mime Lite to see if that makes a difference. I'm guessing if I change the type to application/ms-excel, or something like that, it will work.

I'm thinking OS X Mail is seeing the attachment as plain text and trying to display it inline.

Thanks,


Jay
 
I have one attachment which is about 6MB, and it is not being displayed correctly.

------=_NextPart_000_19ED90_01C827AF.18D4213D
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
charset=US-ASCII
Content-Disposition: inline

Attached are the proxy server logs for the previous 12 hour period.

------=_NextPart_000_19ED90_01C827AF.18D4213D
Content-Transfer-Encoding: base64
Content-Type: application/vnd.sun.xml.calc;
name=Proxy_logs.csv
X-Apple-Content-Length: 6021176
Content-Disposition: attachment;
filename=Proxy_logs.csv


------=_NextPart_000_19ED90_01C827AF.18D4213D--

Any suggestions?

Thanks,


Jay
 
This could be worth a look

Paul
------------------------------------
Spend an hour a week on CPAN, helps cure all known programming ailments ;-)
 
Thanks. I'll do some reading and see what I can come up with.


Jay
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top