mailto-link problem with outlook/encoding

C

cebsystems

Hello all out there!

I don't know if this is the correct group for posting this, please correct
me/it, if you have a better group for it...

We have a customer who uses utf-8 encoded websites and wants mailto-link on
some websites with integrated subject/content.

Website is written in ASP (.NET is not available at customer site).

So according to RFC (as far as I could interpret it), we created a
mailto-link like this
mailto:[email protected]?subject=%3D%3Fiso%2D8859%2D1%3FQ%3FPenso_que_dever=e1_ser_a_Assist=eancia_T=e9cnica_a_definir_qual_o_prefixo_a_aparecer_neste_campo.miniMAXX_pilhas%3F%3D&body=%3D%3Fiso%2D8859%2D1%3FQ%3FAnomalia:Aparelho_n=e3o_efectua_igni=e7=e3o._Igni=e7=e3o_lenta_e_dif=edcil.%3F%3D

What shows up in Outlook instead of encoded strings is that:
Subject
=?iso-8859-1?Q?Penso_que_dever=e1_ser_a_Assist=eancia_T=e9cnica_a_definir_qual_o_prefixo_a_aparecer_neste_campo.miniMAXX_pilhas?=

Content
=?iso-8859-1?Q?Anomalia:Aparelho_n=e3o_efectua_igni=e7=e3o._Igni=e7=e3o_lenta_e_dif=edcil.?=

In Firebird everything displays correctly.

Would be very kind of you if you could help us with that.
 
D

David Berry

What's the ASP Code you're using to create the mail link? Can you post it
here?
 
C

cebsystems

Mainly we are using a function which creates the quoted string for iso-8859-1
different and then
we add the iso-tags around with Response.Write("mailto:" +
Server.URLEncode("=?iso-8859-1?Q?") + encodedStr + Server.URLEncode("?="))

But I guess there might just be a Problem with the iso-tags, so that Outlook
doesn't interpret them as iso-tags?!

--
CEB-Systems GbR
Sudetenstrasse 6
60437 Frankfurt


David Berry said:
What's the ASP Code you're using to create the mail link? Can you post it
here?
 
D

David Berry

Why not use CDOSYS to send your emails? For example:

Sending a TEXT Message


<%
Dim iMsg
Dim iConf
Dim Flds
Dim strText

' set the CDOSYS configuration fields to use port 25 on the SMTP server
Const cdoSendUsingPort = 2

set iMsg = CreateObject("CDO.Message")
set iConf = CreateObject("CDO.Configuration")

Set Flds = iConf.Fields

With Flds
..Item("http://schemas.microsoft.com/cdo/configuration/sendusing") =
cdoSendUsingPort
..Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") =
"mail.mydomain.com"
..Item("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout")
= 10
..Update
End With

strText = "This is a sample email"
strText = strText & "sent from the Web Site"
strText = strText & "using CDOSys"

With iMsg
Set .Configuration = iConf
..To = "(e-mail address removed)"
..From = "(e-mail address removed)"
..Subject = "This is from a remote SMTP server."
..BodyPart.Charset = "iso-8859-1"
..TextBody = strText
..Send
End With

Set iMsg = Nothing
Set iConf = Nothing
Set Flds = Nothing
%>


Sending an HTML formatted Message


<%
Dim iMsg
Dim iConf
Dim Flds
Dim strHTML

' set the CDOSYS configuration fields to use port 25 on the SMTP server
Const cdoSendUsingPort = 2

set iMsg = CreateObject("CDO.Message")
set iConf = CreateObject("CDO.Configuration")

Set Flds = iConf.Fields

With Flds
..Item("http://schemas.microsoft.com/cdo/configuration/sendusing") =
cdoSendUsingPort
..Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") =
"mail.mydomain.com"
..Item("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout")
= 10
..Update
End With

strHTML = "<HTML>"
strHTML = strHTML & "<HEAD>"
strHTML = strHTML & "<BODY>"
strHTML = strHTML & "<b> Hello there! </b></br>"
strHTML = strHTML & "</BODY>"
strHTML = strHTML & "</HTML>"

With iMsg
Set .Configuration = iConf
..To = "(e-mail address removed)"
..From = "(e-mail address removed)"
..Subject = "This is from a remote SMTP server."
..HTMLBodyPart.Charset = "iso-8859-1"
..HTMLBody = strHTML
..Send
End With

Set iMsg = Nothing
Set iConf = Nothing
Set Flds = Nothing
%>



cebsystems said:
Mainly we are using a function which creates the quoted string for
iso-8859-1
different and then
we add the iso-tags around with Response.Write("mailto:" +
Server.URLEncode("=?iso-8859-1?Q?") + encodedStr + Server.URLEncode("?="))

But I guess there might just be a Problem with the iso-tags, so that
Outlook
doesn't interpret them as iso-tags?!
 
C

cebsystems

Because this is not allowed/wanted from customer-site.
I can't do anything against customer decisions, I just need to do the work,
so I need your
help to get these links runnin in Outlook, too.
 
D

David Berry

That's strange since they wouldn't need to install anything on the server to
use CDOSYS and, the advantage is that they can turn of the SMTP server in
IIS - better security.

Anyway, you might want to try one of the ASP or Outlook newsgroups - more
experts there.
 
C

cebsystems

The question in this thread (1st post) ;o)
Shall I post it again?

--
CEB-Systems GbR
Sudetenstrasse 6
60437 Frankfurt


Windsun said:
About what?

-------------------------------------------------------------------------
 
M

Murray

Given the unreliability of mailto: links, I would never use it for a
critical response anyhow. Why not create a form that they can fill in, and
process the mail on the server-side?

--
Murray
--------------
MVP FrontPage


cebsystems said:
The question in this thread (1st post) ;o)
Shall I post it again?
 
C

cebsystems

The reason is easy... The customer wants a mailto-link and no mail-form and
doesn't want to discuss that.
 
M

Murray

Oh. Then, the customer has gotten what they requested.

--
Murray
--------------
MVP FrontPage


cebsystems said:
The reason is easy... The customer wants a mailto-link and no mail-form
and
doesn't want to discuss that.
 
D

David Berry

Ok. So they don't want a mail form but that still doesn't explain why they
would be opposed to using CDOSYS (see my previous post) to send email. You
could have a link that runs through the ASP script, encodes the message and
sends it. Once it's sent it would take them back to the page they were on.
For example:

on the page you'd have add <a href="sendemail.asp">Click to Send Email</a>

And then create a Sendemail.asp page with JUST the following code (no HTML)

You'll need to change the email address, mail server name, body and subject
(I was guessing at what they were from the link you posted since I don't
know the language) and then at the bottom where it says Response.Redirect
change that to the name of the page the link was on.


<%

Dim iMsg
Dim iConf
Dim Flds
Dim strText

' set the CDOSYS configuration fields to use port 25 on the SMTP server
Const cdoSendUsingPort = 2

set iMsg = CreateObject("CDO.Message")
set iConf = CreateObject("CDO.Configuration")

Set Flds = iConf.Fields

With Flds
..Item("http://schemas.microsoft.com/cdo/configuration/sendusing") =
cdoSendUsingPort
..Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") =
"mail.mydomain.com"
..Item("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout")
= 10
..Update
End With

strText =
"Anomalia:Aparelho_n=e3o_efectua_igni=e7=e3o._Igni=e7=e3o_lenta_e_dif=edcil."

With iMsg
Set .Configuration = iConf
..To = "(e-mail address removed)"
..From = "(e-mail address removed)"
..Subject
"Penso_que_dever=e1_ser_a_Assist=eancia_T=e9cnica_a_definir_qual_o_prefixo_a_aparecer_neste_campo.miniMAXX_pilhas."
..BodyPart.Charset = "iso-8859-1"
..TextBody = strText
..Send
End With

Set iMsg = Nothing
Set iConf = Nothing
Set Flds = Nothing

Response.Redirect ("theoriginalpage.asp")

%>

This solution requires no form and nothing special they have to do on the
server. It would be transparent to the user and solve this problem.


cebsystems said:
The reason is easy... The customer wants a mailto-link and no mail-form
and
doesn't want to discuss that.
 
C

cebsystems

They Requested a working mailto link, which works in mail-clients and
displays the correct subject/body, which does not in outlook, but in
thunderbird, so I still need help in gettin this to work in outlook.

Switching to a mail-script, which sends mail from or over an own mailserver
is though not an option, I'm sorry. Isn't outlook able to work with these
standard encoding descriptions in mailto-links?
 
C

cebsystems

They Requested a working mailto link, which works in mail-clients and
displays the correct subject/body, which does not in outlook, but in
thunderbird, so I still need help in gettin this to work in outlook.

Switching to a mail-script, which sends mail from or over an own mailserver
is though not an option, I'm sorry. Isn't outlook able to work with these
standard encoding descriptions in mailto-links?
 
D

David Berry

In that case the answer is simple. You need to tell the client it can't be
done the way they want it and move to the next client. OR they can

1. Allow you to use a form as Murray suggested
2. Allow you to do this with server-side scripting
3. Allow you to switch to ASP.NET
4. Allow you to take any suggestion that's been offered except the mailto
link

OR you can try the Outlook news group since Outlook appears to be your
problem. Reposting this same question over and over again here or in one of
the other FrontPage newsgroups is going to get you the same response. The
mailto link isn't reliable enough to handle this consistently in all email
programs.



cebsystems said:
They Requested a working mailto link, which works in mail-clients and
displays the correct subject/body, which does not in outlook, but in
thunderbird, so I still need help in gettin this to work in outlook.

Switching to a mail-script, which sends mail from or over an own
mailserver
is though not an option, I'm sorry. Isn't outlook able to work with these
standard encoding descriptions in mailto-links?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top