Information: Forum is in read-only mode
For details and other support options see https://www.adiscon.com/news/support-forum-set-to-read-only-mode/

Attachment Encoding

Support, Questions and Discussions on SimpleMail

Moderator: alorbach

Google Ads


Attachment Encoding

Postby cso » Wed Jan 19, 2005 4:31 pm

Hello,

We have been able to install your program and run it using VB.

The problem is how the attached file is encoded using your application.

When sent to a mail server with a web-based user portal, the email is sent with the encoded attachment, but the attachment is not recognized *as* an attachment. People who use the web server interface are unable to click a "download attachment" because the attachment is not recognized.

The only difference I could find was in the Content-Type specification in the undecoded message:

--_----200519-1796.193-3715
Content-Type: application/octet-stream;
name="rptHousingPatrols.rtf"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="rptHousingPatrols.rtf"

In an email sent from a mail client (either web based or local based like Eudora), the same section reads as:

--_===4414122====calmail-be1.berkeley.edu===_
Content-Type: text/richtext
Content-Disposition: attachment;
filename="rptHousingPatrols.rtf"
Content-Transfer-Encoding: base64

Is this a known problem and is there anyway around it? Here is our code:

Dim objMailClient As Object
Set objMailClient = CreateObject("ADISCON.SimpleMail.1")
With objMailClient
.MailServer = "calmail.berkeley.edu"
.Sender = "cso@berkeley.edu"
.AttachFile "C:\rptHousingPatrols.rtf", "rptHousingPatrols.rtf"
.Recipient = "cso@berkeley.edu"
.Subject = "Patrol File"
.MessageText = "The attached file is a patrol summary."
End With
Call objMailClient.SendEx
Set objMailClient = Nothing

Thanks in advance for your help!
cso
New
 
Posts: 1
Joined: Wed Jan 19, 2005 4:18 pm

Postby alorbach » Thu Jan 20, 2005 1:45 pm

Hi,

the only thing we can do is adding another property into the attachment functions, do manually define and set the "Content-Type" for each attachment.

I will forward this to development, they may can implement this rather fast.

best regards,
Andre Lorbach
alorbach
Site Admin
 
Posts: 1627
Joined: Thu Feb 13, 2003 11:55 am

Postby alorbach » Thu Jan 20, 2005 5:09 pm

Hi again,

well said - done. It was an easy enhancment, so we were able to add it quickly. We had added a new Method which has an additional parameter to pass the ContentType to.

Here is a quote from the manual:
AttachFileWithContentType(LocalFileName, FileDisplayName, ContentType)

This method is almost similar to AttachFile(), expect that you can additionally specify the ContentType for the Attachment. Be careful to choose the correct ContentType, an invalid or empty one can cause problems with the emailclient reading emails from SimpleMail.


Please update your SimpleMail installation with the latest setup which can be downloaded from http://www.simplemail.adiscon.com/en/Download/.
Don't mind that the download text still says 3.1 SP3, it has been updated with the 3.1 SP4 release.

best regards,
Andre Lorbach
alorbach
Site Admin
 
Posts: 1627
Joined: Thu Feb 13, 2003 11:55 am

Google Ads



Return to SimpleMail

Who is online

Users browsing this forum: No registered users and 0 guests

cron