FalconUK
asked on
JMail attachments not appearing correctly in Outlook
I'm trying to send a mail using JMail 4.4 and I'm having a big problem with Outlook. Internet mail clients do not show this behaviour.
The email is arriving at the destination, but the attachment is not 'attaching' correctly. The email in Outlook (2002 & XP) does not show the paperclip next to the mail icon to indicate there is an attachment, but if you select the file menu, then Save Attachments> you get a 'None' menu item (and not the correct filename), but if you select this you get the save as dialog with the correct file name, and the attachment is saved correctly.
I've tried all sorts of Content-Types to get the email to show up as having an attachment, but with little sucess.
The attachment is a very small zip file, although it doesn't matter what I attach, the results are the same.
If I specify the Content-Type of the JMail as "text/plain", "text/html", "multipart/mixed" I get no paperclip icon.
This is the code I'm using:
<%
Set JMail = Server.CreateObject("JMail .SMTPMail" )
JMail.Logging = True
JMail.ServerAddress = "myhost.net"
JMail.Sender = "chris@nospam.com"
JMail.SenderName = "ChrisB
JMail.Subject = "Code"
JMail.AddRecipient "chris@nospam.com"
JMail.ISOEncodeHeaders = False
JMail.ContentType = "multipart/mixed"
JMail.Body = "Does it work?"
JMail.AddAttachment Server.MapPath("code1.zip" )
JMail.Execute
Set JMail = Nothing
%>
If I wrongly specify the email Content-Type as "application/x-zip-compres sed" (just to see what happens) I do get my paperclip icon, but I get two corrupt code.zip (not code1.zip) attachments. And these are corrupt as they have the first text email part with MIME header in the saved zip file.
I think I've tried every combination of content-types, both for the JMail.ContentType and the AddAttachment "code1.zip", Content-Type, and cant get this to work.
This is the raw content of an email sent with multipart/mixed for the email content type, and application/x-zip-compress ed for the attachment, which doesnt show up as having an attachment in Outlook, but works fine in my internet browser mail (SmarterMail Pro 2.0)
...HEADERS...
Subject: Code
Sender: "Chris Website" <chrisweb@nospam.com>
From: "Chris Website" <chrisweb@nospam.com>
Date: Fri, 15 Oct 2004 11:06:55 +0100
To: "chris@nospam.com" <chris@nospam.com>,
"chris@nospam.com" <chris@nospam.com>
X-Priority: 3
X-MSMail-Priority: Normal
MIME-Version: 1.0
X-Mailer: JMail 4.4 by Dimac
Content-Type: multipart/mixed;
boundary="--NEXT_BM_47AF77 64AA5E46A9 9C4311D7F3 057119"
Message-Id: <20041015100655.C623C214BB 9@mxhost-1 .vi.net>
Virtual_Internet-SpamScore : s
Virtual_Internet-From: chris@nospam.com
This is a multipart message in MIME format.
----NEXT_BM_47AF7764AA5E46 A99C4311D7 F3057119
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: Quoted-Printable
Does it work=3F
----NEXT_BM_47AF7764AA5E46 A99C4311D7 F3057119
Content-Type: application/x-zip-compress ed; name="code1.zip"
Content-Transfer-Encoding: base64
Content-Description: code1.zip
Content-Disposition: attachment; filename="code1.zip"
Content-ID: <8E242FFFAA4F4F43B6A73C1ED FA84822>
UEsDBBQAAAAIALFsSzEctpM4rw IAACYGAAAI AAAAY29kZS 50eHS9VG1v 2jAQ
..ETC...
toEAAAAAY29kZS50eHRQSwUGAA AAAAEAAQA2 AAAA1QIAAA AA
----NEXT_BM_47AF7764AA5E46 A99C4311D7 F3057119--
I need to get this fixed asap as this is a component that will be serving my customers with files from the site, and getting this working in Outlook is a must!
Please help, I'm going Content-Type insane with all this.
Cheers,
Chris.
The email is arriving at the destination, but the attachment is not 'attaching' correctly. The email in Outlook (2002 & XP) does not show the paperclip next to the mail icon to indicate there is an attachment, but if you select the file menu, then Save Attachments> you get a 'None' menu item (and not the correct filename), but if you select this you get the save as dialog with the correct file name, and the attachment is saved correctly.
I've tried all sorts of Content-Types to get the email to show up as having an attachment, but with little sucess.
The attachment is a very small zip file, although it doesn't matter what I attach, the results are the same.
If I specify the Content-Type of the JMail as "text/plain", "text/html", "multipart/mixed" I get no paperclip icon.
This is the code I'm using:
<%
Set JMail = Server.CreateObject("JMail
JMail.Logging = True
JMail.ServerAddress = "myhost.net"
JMail.Sender = "chris@nospam.com"
JMail.SenderName = "ChrisB
JMail.Subject = "Code"
JMail.AddRecipient "chris@nospam.com"
JMail.ISOEncodeHeaders = False
JMail.ContentType = "multipart/mixed"
JMail.Body = "Does it work?"
JMail.AddAttachment Server.MapPath("code1.zip"
JMail.Execute
Set JMail = Nothing
%>
If I wrongly specify the email Content-Type as "application/x-zip-compres
I think I've tried every combination of content-types, both for the JMail.ContentType and the AddAttachment "code1.zip", Content-Type, and cant get this to work.
This is the raw content of an email sent with multipart/mixed for the email content type, and application/x-zip-compress
...HEADERS...
Subject: Code
Sender: "Chris Website" <chrisweb@nospam.com>
From: "Chris Website" <chrisweb@nospam.com>
Date: Fri, 15 Oct 2004 11:06:55 +0100
To: "chris@nospam.com" <chris@nospam.com>,
"chris@nospam.com" <chris@nospam.com>
X-Priority: 3
X-MSMail-Priority: Normal
MIME-Version: 1.0
X-Mailer: JMail 4.4 by Dimac
Content-Type: multipart/mixed;
boundary="--NEXT_BM_47AF77
Message-Id: <20041015100655.C623C214BB
Virtual_Internet-SpamScore
Virtual_Internet-From: chris@nospam.com
This is a multipart message in MIME format.
----NEXT_BM_47AF7764AA5E46
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding:
Does it work=3F
----NEXT_BM_47AF7764AA5E46
Content-Type: application/x-zip-compress
Content-Transfer-Encoding:
Content-Description: code1.zip
Content-Disposition: attachment; filename="code1.zip"
Content-ID: <8E242FFFAA4F4F43B6A73C1ED
UEsDBBQAAAAIALFsSzEctpM4rw
..ETC...
toEAAAAAY29kZS50eHRQSwUGAA
----NEXT_BM_47AF7764AA5E46
I need to get this fixed asap as this is a component that will be serving my customers with files from the site, and getting this working in Outlook is a must!
Please help, I'm going Content-Type insane with all this.
Cheers,
Chris.
ASKER
I get no paper clip, but I can save the file correctly by File > Save Attachments > None.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
That sounds like what I need but apparently I dont have that method, even though JMail.Version shows 4.4???
Can I add this header myself to the mail object?
Can I add this header myself to the mail object?
Nope not unlesss you have the proper version.4.4
Right click on the jmail dll and view the version iyou've.
Right click on the jmail dll and view the version iyou've.
Listening ...
Got the same problem, couldn't find a way to solve it for the moment.
Any solution gets 500 more points from me ...
Got the same problem, couldn't find a way to solve it for the moment.
Any solution gets 500 more points from me ...
ASKER
Just logged a support call with my ISP to upgrade the JMail component to the lastest version.
I'm waiting to hear back from them...fingers crossed!
Interesting enough, MS seam to be aware of this problem...
http://support.microsoft.com/kb/313316/EN-US/
I'm waiting to hear back from them...fingers crossed!
Interesting enough, MS seam to be aware of this problem...
http://support.microsoft.com/kb/313316/EN-US/
They claim v4.4 has solved the above problem.
From the dimac website http://www.dimac.net/
-------------------------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ----------
Q: When I attach files to my HTML mails, the attached files just look like this:
This is a multipart message in MIME format. ----NEXT_BM_2D86444211634C EF8F266D5A C452437C Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: Quoted-Printable body text ----NEXT_BM_2D86444211634C EF8F266D5A C452437C Content-Type: application/octet-stream; name="=?iso-8859-1?Q?help= 2Egif?=" Content-Transfer-Encoding: base64 Content-Description: =?iso-8859-1?Q?help=2Egif? = Content-Disposition: attachment; filename="=?iso-8859-1?Q?h elp=2Egif? =" Content-ID: R0lGODlhEAAQAPcAAAAAAIAAAA CAAICAAAAA gIAAgACAgM DAwMDcwKbK 8EBC SkFETEJFTUNGTUVIT0lMVExOWF JWX1peaFte aV1hbGFlb2 RqdmhseAAw vQtF uAxFuw1IvRBHuRVMtyRWuTxkuQ 9KwQ9KxBBL wRNOxhtTwx pTxx9VxB5W xRlU yRRT0SNYwCFYySNayiNbyyBazS FazCJbzSZc yitewylexi ldySheyihf yyle...
A: Try removing this line:
JMail.ContentType = "text/html"
and just use:
JMail.Body = "..." (for the plain text version)
JMail.HTMLBody = "..." (for the html version)
-------------------------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ----------
New in v 4.4:
- Some issues regarding incorrect handling of attachments in
POP3 were fixed.
- An issue which sometimes generated an error when iterating
multiple attachments were fixed.
- The property "NoAutoContentID" was added to the message object. If set to true, no Content-ID header will be generated for regular attachments. For inline attachments, the header is still set. This can be used to solve some attachment problems occuring with certain email-clients. The default value is false.
From the dimac website http://www.dimac.net/
--------------------------
Q: When I attach files to my HTML mails, the attached files just look like this:
This is a multipart message in MIME format. ----NEXT_BM_2D86444211634C
A: Try removing this line:
JMail.ContentType = "text/html"
and just use:
JMail.Body = "..." (for the plain text version)
JMail.HTMLBody = "..." (for the html version)
--------------------------
New in v 4.4:
- Some issues regarding incorrect handling of attachments in
POP3 were fixed.
- An issue which sometimes generated an error when iterating
multiple attachments were fixed.
- The property "NoAutoContentID" was added to the message object. If set to true, no Content-ID header will be generated for regular attachments. For inline attachments, the header is still set. This can be used to solve some attachment problems occuring with certain email-clients. The default value is false.
FYI
I upgraded to 4.4 and tried NoAutoContentID = true
Still getting a "None" in the Save Attachments menu :-(
I upgraded to 4.4 and tried NoAutoContentID = true
Still getting a "None" in the Save Attachments menu :-(
ASKER
Just had an email from my ISP.
They are not prepared to upgrade the JMail component anyway.
Security issues, compatibility issues, effects on other customers and licencing were their reasons.
Does anyone have any other ideas on this one?
They are not prepared to upgrade the JMail component anyway.
Security issues, compatibility issues, effects on other customers and licencing were their reasons.
Does anyone have any other ideas on this one?
Try some other mail client dll like funcky or aspemail ?
ASKER
This was my web site hosts reply:
Your welcome to try other mailing scripts that can be downloaded on the Internet and uploaded to your website, however we can't give you any assistance if you have trouble configuring the script nor can we guarantee this will work on our servers.
So can anyone recomend something they use them selves, something easy to setup?
I'm guessing that I need something different than products like JMail, as this needs to be installed my hosts servers, and this isnt going to happen.
Are there any scripts out there that I can use that dont require me to install anything on their server?
All I want to do is send emails with attachements!
Chris.
Your welcome to try other mailing scripts that can be downloaded on the Internet and uploaded to your website, however we can't give you any assistance if you have trouble configuring the script nor can we guarantee this will work on our servers.
So can anyone recomend something they use them selves, something easy to setup?
I'm guessing that I need something different than products like JMail, as this needs to be installed my hosts servers, and this isnt going to happen.
Are there any scripts out there that I can use that dont require me to install anything on their server?
All I want to do is send emails with attachements!
Chris.
What server side scripting language do they support ? if you use php or cgi for example there are lots of mail classes that you could use for your requirement
ASKER
I'm sure that sajuks second answer would of worked, but I have no way of testing this.
So I am no longer sending emails with attachments.
I didn't want to accept this answer without testing it, although I'm sure it true as I have read on a few more web sites about it.
So I am no longer sending emails with attachments.
I didn't want to accept this answer without testing it, although I'm sure it true as I have read on a few more web sites about it.
<%
Set JMail = Server.CreateObject("JMail
JMail.Logging = True
JMail.ServerAddress = "myhost.net"
JMail.Sender = "chris@nospam.com"
JMail.SenderName = "ChrisB
JMail.Subject = "Code"
JMail.AddRecipient "chris@nospam.com"
JMail.ISOEncodeHeaders = False
JMail.Body = "Does it work?"
JMail.AddAttachment Server.MapPath("code1.zip"
JMail.Execute
Set JMail = Nothing
%>