I evaluate mailEnable PRO, and when using webmail, I have problems:
- viewing INBOX, the lower frame with message preview, there is a link near sender's address which says "Add to contacts". When I click that link, I get new window opened, and there is a message "Session expired". When closing that window, main aplication works normally, with no timeouts.
I guess, that "Add to contacts" link passes the wrong SESSION ID parameter (eg. in situation, when user re-logged once before)
- for incoming mail, when mail is NOT HTML, links and e-mail adresses in message body are not active - just simple text. But if message was sent as HTML formatted, links and e-mails are displayed correctly.
I want ALL links and email adresses to be displaied as active links! Any workaround?
Session timeouts & html formatting
Compose, Contact temp fix
I had the timeout issue when clicking EDIT to attach a contact. Javascript seems to be causing this error. The sessions are not available after the window.open command was made.
I modified the following files:
%MailEnableDir%/BIN/webmail/base/default/lang/EN/AddressBook.asp
%MailEnableDir%/BIN/webmail/base/default/lang/EN/Forms/MAI/compose.asp
Here is the code for each, it takes the session info and brings it down to a querystring for the addressbook window.
AddressBook.asp
########################
compose.asp
To use, copy the code into a text file and name the files respectively. Then copy them into the above mentioned locations. MAKE SURE TO BACK UP THE OLD ONES!
These obviously ARE NOT supported by mail enable, use them at your own risk, but they should cure the issue.
Andy
I modified the following files:
%MailEnableDir%/BIN/webmail/base/default/lang/EN/AddressBook.asp
%MailEnableDir%/BIN/webmail/base/default/lang/EN/Forms/MAI/compose.asp
Here is the code for each, it takes the session info and brings it down to a querystring for the addressbook window.
AddressBook.asp
Code: Select all
<%
Option Explicit
%>
<%
'Skip the login validation
'<!--#include file="sec.asp" -->
'reestablish "sessions" as variables from the querystring
DIM skin, AUTH_ACCOUNT, AUTH_USERNAME
skin = Request.QueryString("skin")
AUTH_ACCOUNT = Request.QueryString("AUTH_ACCOUNT")
AUTH_USERNAME = Request.QueryString("AUTH_USERNAME")
%>
<%
Function SetListValue(CurrentListValue,ListValue)
If (CStr(ListValue) = CStr(CurrentListValue)) Then
SetListValue = "SELECTED"
End If
End Function
Dim oWebmailOptions
Set oWebmailOptions = Server.CreateObject("MEWebMail.Options")
%>
<html>
<head>
<TITLE>MailEnable Address Book</TITLE>
<META name="ROBOTS" content="NOINDEX,NOFOLLOW">
<META HTTP-EQUIV="Expires" CONTENT="0">
<META http-equiv="Pragma" content="no-cache">
<META http-equiv="Cache-Control" content="no-cache">
<LINK REL="stylesheet" TYPE="text/css" HREF="<% =skin %>me.css">
</head>
<BODY style="background-color:#CFCFCF" marginheight="0" link="#000000" topmargin="0" leftmargin="0" rightmargin="0" marginwidth="0" SCROLL=NO>
<FORM ID=AddressBook NAME=AddressBook>
<%
Function ShowAddressList
If Request("Source") = "Directory" Then
ShowAddressList=ShowDirectory
Else
ShowAddressList=ShowContacts
End If
End Function
Function ShowDirectory
Dim oDirectory
Dim Contacts
Dim ContactCount
Dim FormattedAddress
Dim DelimPos
Set oDirectory = Server.CreateObject("MEWebMail.Directory")
oDirectory.Account = AUTH_ACCOUNT
oDirectory.DirectoryEntryID = ""
oDirectory.DisplayName = ""
oDirectory.MailAddress = ""
oDirectory.DirectoryLocatorID = ""
oDirectory.EntryType = -1
if oDirectory.FindFirstDirectory() = 1 Then
Do
ContactCount = ContactCount + 1
If Left(oDirectory.MailAddress,1) = "[" And Right(oDirectory.MailAddress,1) = "]" Then
DelimPos = InStr(1,oDirectory.MailAddress,":")
If DelimPos > 0 Then
FormattedAddress = Mid(oDirectory.MailAddress,DelimPos+1,Len(oDirectory.MailAddress)-(DelimPos+1))
Else
FormattedAddress = oDirectory.MailAddress
End If
Else
FormattedAddress = oDirectory.MailAddress
End If
Contacts = Contacts & "<OPTION VALUE=""" & FormattedAddress & """>" & oDirectory.DisplayName & "</OPTION>"
oDirectory.Account = AUTH_ACCOUNT
oDirectory.DirectoryEntryID = ""
oDirectory.DisplayName = ""
oDirectory.MailAddress = ""
oDirectory.DirectoryLocatorID = ""
oDirectory.EntryType = -1
Loop While (oDirectory.FindNextDirectory() = 1) And (ContactCount < 300)
End If
Set oDirectory = Nothing
ShowDirectory = Contacts
End Function
Function ShowContacts()
Dim oMessages, RS, Contacts
Set oMessages= Server.CreateObject("MEWebMail.Contacts")
oMessages.PostOffice = AUTH_ACCOUNT
oMessages.UserName = AUTH_USERNAME
oMessages.RelativeFolderPath = "\Contacts"
oMessages.RecordsPerPage = 300
oMessages.SortOrder = "+ FULLNAME"
Set RS = oMessages.ListContacts()
While (Not RS.EOF)
if len(RS.Fields("FULLNAME"))=0 then
Contacts = Contacts & "<OPTION VALUE=""" & RS.Fields("EMAIL") & """>" & RS.Fields("EMAIL") & "</OPTION>"
else
Contacts = Contacts & "<OPTION VALUE=""" & RS.Fields("EMAIL") & """>" & RS.Fields("FULLNAME") & "</OPTION>"
end if
RS.Movenext
Wend
ShowContacts = Contacts
End Function
%>
<TABLE>
<TR>
<TD><B>Current Directory:</B></TD>
<TD></TD>
<TD>
<SELECT ID=Source NAME=Source style="width:160" onchange="ChangeSource()">
<OPTION VALUE=Contacts <%=SetListValue(Request("Source"),"Contacts")%>>Contacts</OPTION>
<%If oWebmailOptions.GetOptionValue("Directory",AUTH_ACCOUNT,AUTH_USERNAME) = 1 Then %>
<OPTION VALUE=Directory <%=SetListValue(Request("Source"),"Directory")%>>Global Address List</OPTION>
<%End If%>
</SELECT>
</TD>
</TR>
<TR>
<TD><B>Directory:</B></TD>
<TD></TD>
<TD><B>Recipients:</B></TD>
</TR>
<TR>
<TD>
<SELECT ID=DirectoryEntries NAME=DirectoryEntries size="15" cols=60 style="width:170">
<%=ShowAddressList()%>
</SELECT>
</TD>
<TD>
<input class=ME_Button type=button onclick="AddEntry()" id=button1 name=button1 value='Add >'>
</TD>
<TD>
<SELECT ID=CurrentRecipients NAME=CurrentRecipients size="15" cols=60 style="width:170">
</SELECT>
</TD>
</TABLE>
<BR>
<TABLE WIDTH="100%" CELLPADDING="5" CELLSPACING="1" BORDER="0">
<TR><TD width="90%"> </TD><TD nowrap valign="middle" ><input class=ME_Button type=button onclick="AddEntries()" id=button1 name=button1 value='Update'></TD><TD ALIGN="right"><input class=ME_Button type=button value='Cancel' onclick="self.close()" id=button2 name=button2></TD>
</TR>
</TABLE>
</FORM>
</body>
<SCRIPT LANGUAGE="JAVASCRIPT">
function AddEntry()
{
optionCounter = document.AddressBook.CurrentRecipients.options.length;
var optionCounter;
var oOption = new Option(document.AddressBook.DirectoryEntries.options[document.AddressBook.DirectoryEntries.selectedIndex].value,document.AddressBook.DirectoryEntries.options[document.AddressBook.DirectoryEntries.selectedIndex].value);
document.AddressBook.CurrentRecipients.options[optionCounter] = oOption;
//var oOption = document.createElement("OPTION");
//document.AddressBook.CurrentRecipients.options.add(oOption);
//oOption.innerText = document.AddressBook.DirectoryEntries.options[document.AddressBook.DirectoryEntries.selectedIndex].value
//oOption.value = document.AddressBook.DirectoryEntries.options[document.AddressBook.DirectoryEntries.selectedIndex].value
return false;
}
function AddEntries()
{
var i;
if (document.AddressBook.CurrentRecipients.options.length > 0)
{
if (window.opener.document.forms[0].<%=Request("Target")%>.value.length == 0)
{
window.opener.document.forms[0].<%=Request("Target")%>.value = document.AddressBook.CurrentRecipients.options[0].value;
for (i=1;i<document.AddressBook.CurrentRecipients.options.length;i++)
{
window.opener.document.forms[0].<%=Request("Target")%>.value = window.opener.document.forms[0].<%=Request("Target")%>.value + ';' + document.AddressBook.CurrentRecipients.options[i].value;
}
}
else
{
for (i=0;i<document.AddressBook.CurrentRecipients.options.length;i++)
{
window.opener.document.forms[0].<%=Request("Target")%>.value = window.opener.document.forms[0].<%=Request("Target")%>.value + ';' + document.AddressBook.CurrentRecipients.options[i].value;
}
}
}
//
// Now lets dump what we have into the caller
//
self.close();
return false;
}
function ChangeSource()
{
window.location = '<%=Application("MEWebPath")%>/base/default/lang/EN/AddressBook.asp?Target=<%=Request("Target")%>&Source=' + document.AddressBook.Source.options[document.AddressBook.Source.selectedIndex].value
}
</SCRIPT>
</html>
<%Set oWebmailOptions = Nothing%>
compose.asp
Code: Select all
<!--#include file="sec.asp" -->
<%
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
' MailEnable Web Client Application
'
' (C) MailEnable Pty. Ltd. 2002, 2003
'
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Function GetFieldCount(InString, FieldDelimiter)
Dim DelimiterPos
Dim DelimiterCount
DelimiterPos = 0
'
' We want a safety mechanism here to avoid infinite looping
'
Do
DelimiterPos = InStr(DelimiterPos + 1, InString, FieldDelimiter)
DelimiterCount = DelimiterCount + 1
Loop While (DelimiterPos > 0) And (DelimiterCount < 50)
GetFieldCount = DelimiterCount
End Function
Function GetListItem(ItemList, Delimiter, ItemNumber)
'gets the specific item from a delimited list
Dim sItems
On Error Resume Next 'return empty if there is an error
sItems = Split(ItemList, Delimiter)
GetListItem = sItems(ItemNumber - 1)
End Function
Function GetAutoSignitureContent
Set oMailbox = Server.CreateObject("MEWebMail.Mailbox")
oMailbox.Postoffice = Session("AUTH_ACCOUNT")
oMailbox.Mailbox = Session("AUTH_USERNAME")
AutoSignatureStatus = oMailbox.GetAutoSignatureStatus(Session("AUTH_ACCOUNT"),Session("AUTH_USERNAME"))
If AutoSignatureStatus = 1 Then
GetAutoSignitureContent = Chr(13) & Chr(10) & Chr(13) & Chr(10) & oMailbox.GetSignature(Session("AUTH_ACCOUNT"),Session("AUTH_USERNAME"))
Else
GetAutoSignitureContent = ""
End If
Set oMailbox = Nothing
End Function
Function StripAddressList(ByVal AddressList)
For i = 1 to GetFieldCount(AddressList,chr(9))
'
' We have an address
'
'now we need to split it up into its bits.
ItemAddress=GetListItem(AddressList,chr(9),i)
If InStr(1,ItemAddress,"""") or (instr(1,ItemAddress,"<")>1) Then
'We need to get the first part
Alias = GetListItem(ItemAddress,"<",1)
if left(Alias,1)="""" and len(Alias)>3 then
Alias = mid(Alias,2,len(Alias)-3)
end if
Address = GetListItem(ItemAddress,"<",2)
if len(Address)>1 then
Address = Left(Address,Len(Address)-1)
end if
Else
Alias = Replace(Replace(ItemAddress,"<",""),">","")
Address = Alias
End If
If Len(HTMLAddress) <= 0 Then
HTMLAddress= LTrim(Address)
Else
HTMLAddress = HTMLAddress & "," & LTrim(Address)
End If
Next
StripAddressList = HTMLAddress
End Function
' We need to save the message because it was passed to us
gPostOffice = Session ("POSTOFFICE")
gUserName = Session ("AUTH_USERNAME")
gPassword = Session ("AUTH_PASSWORD")
FrmMailbox = Session ("AUTH_USERNAME")
MessageID = Request("ID")
Set oMailbox = Server.CreateObject("MEWebMail.Mailbox")
oMailbox.Postoffice = Session("AUTH_ACCOUNT")
oMailbox.Mailbox = Session("AUTH_USERNAME")
FrmMailboxCharSet=oMailbox.GetCharSet
set oMailbox = nothing
Select Case Request("ComposeMode")
Case "Options"
If Request("Folder") = "" Then
RelativeFolderPath="\Drafts"
Else
RelativeFolderPath=Request("Folder")
End If
Set oMessage = Server.CreateObject("MEWebMail.MailMessage")
oMessage.PostOffice = gPostoffice
oMessage.Username = gUserName
oMessage.Password = gPassword
oMessage.MessageID = MessageID
oMessage.RelativeFolderPath = RelativeFolderPath
oMessage.ComposeMode = True
oMessage.GetMessage
If Len(Request("PRIORITY")) > 0 Then
oMessage.AddHeader "X-Priority",Request("PRIORITY")
Select Case Request("PRIORITY")
Case "1": oMessage.AddHeader "X-MSMail-Priority","High"
Case "2": oMessage.AddHeader "X-MSMail-Priority","Normal"
Case "3": oMessage.AddHeader "X-MSMail-Priority","Medium"
End Select
End If
If UCase(Request("READ-RECEIPT")) = "ON" Then
oMessage.AddHeader "Disposition-Notification-To","<" & oMessage.FromRecipients & ">"
Else
oMessage.RemoveHeader "Disposition-Notification-To"
End If
Set oMessage = Nothing
End Select
Dim oMessage
Select Case Request("Mode")
Case "Reply"
'
' We need to read the message into our own variables and get ready
'
Set oMessage = Server.CreateObject("MEWebMail.MailMessage")
oMessage.MarkAsRead = True
oMessage.PostOffice = gPostoffice
oMessage.Username = gUserName
oMessage.Password = gPassword
oMessage.MessageID = MessageID
If Request("Folder") = "" Then
RelativeFolderPath="\Drafts"
Else
RelativeFolderPath=Request("Folder")
End If
oMessage.RelativeFolderPath = RelativeFolderPath
oMessage.MarkAsRead = True
oMessage.FlagStatus = 1
oMessage.ComposeMode = True
If oMessage.GetMessage Then
Importance = oMessage.Importance
FlagStatus = oMessage.FlagStatus
Attachments = oMessage.Attachment
From = oMessage.FromRecipients
ReplyTo = oMessage.ReplyTo
ToRecipients = oMessage.ToRecipients
CCRecipients = oMessage.CCRecipients
Subject = oMessage.Subject
Received = oMessage.MessageDate
Body = oMessage.Body
Recipient = oMessage.Recipient
MessageID=oMessage.GetUniqueMessageID
FrmMsgBody = GetAutoSignitureContent & Chr(13) & Chr(10) & Chr(13) & Chr(10) & "----- Original Message -----" & Chr(13) & Chr(10) & _
"From: " & From & Chr(13) & Chr(10) & _
"To: " & replace(ToRecipients,chr(9),",") & Chr(13) & Chr(10)
if len(CCRecipients)>0 then FrmMsgBody = FrmMsgBody & "Cc: " & replace(CCRecipients,chr(9),",") & Chr(13) & Chr(10)
FrmMsgBody = FrmMsgBody & "Sent: " & Received & Chr(13) & Chr(10) & _
"Subject: " & Subject & Chr(13) & Chr(10) & Chr(13) & Chr(10) & Body
If UCase(Left(Subject,3)) = "RE:" Then
FrmMsgSubject = Subject
Else
FrmMsgSubject = "Re: " & Subject
End If
FrmMsgTo = ReplyTo
WindowTitle = "Reply-" & Subject
set oMessage = nothing
Else
set oMessage = nothing
Response.Write "Message has been deleted and no longer exists<BR>"
Response.Write "Please click <a href='read.asp?Mode=Close'>here</a> to close this window."
Response.End
End If
Case "ReplyAll"
RelativeFolderPath="\Inbox"
MessageID = Request("ID")
Set oMessage = Server.CreateObject("MEWebMail.MailMessage")
oMessage.MarkAsRead = True
oMessage.PostOffice = gPostoffice
oMessage.Username = gUserName
oMessage.Password = gPassword
oMessage.MessageID = MessageID
If Request("Folder") = "" Then
RelativeFolderPath="\Drafts"
Else
RelativeFolderPath=Request("Folder")
End If
oMessage.RelativeFolderPath = RelativeFolderPath
oMessage.MarkAsRead = True
oMessage.FlagStatus = 1
oMessage.ComposeMode = True
If oMessage.GetMessage Then
Importance = oMessage.Importance
FlagStatus = oMessage.FlagStatus
Attachments = oMessage.Attachment
From = oMessage.FromRecipients
ToRecipients = oMessage.ToRecipients
CCRecipients = oMessage.CCRecipientsEmail
Subject = oMessage.Subject
Received = oMessage.MessageDate
Body = oMessage.Body
ReplyTo = oMessage.ReplyTo
Recipient = oMessage.Recipient
FrmMsgBody = GetAutoSignitureContent & Chr(13) & Chr(10) & Chr(13) & Chr(10) & "----- Original Message -----" & Chr(13) & Chr(10) & _
"From: " & From & Chr(13) & Chr(10) & "To: " & replace(ToRecipients,chr(9),",") & Chr(13) & Chr(10)
if len(CCRecipients)>0 then FrmMsgBody = FrmMsgBody & "Cc: " & replace(CCRecipients,chr(9),",") & Chr(13) & Chr(10)
FrmMsgBody = FrmMsgBody & "Sent: " & Received & Chr(13) & Chr(10) & _
"Subject: " & Subject & Chr(13) & Chr(10) & Chr(13) & Chr(10) & Body
FrmMsgSubject = "Re: " & Subject
FrmMsgTo = oMessage.FromRecipientsEmail & "," & oMessage.ToRecipientsEmail
FrmMsgCC = CCRecipients
WindowTitle = "Reply-" & Subject
set oMessage = nothing
Else
set oMessage = nothing
Response.Write "Message has been delete and no longer exists<BR>"
Response.Write "Please click <a href='read.asp?Mode=Close'>here</a> to close this window."
Response.End
End If
Case "Forward"
'
' Forwarding is a special case, we need to copy the message to the Drafts folder first
'
If Request("Folder") = "" Then
RelativeFolderPath="\Inbox"
Else
RelativeFolderPath=Request("Folder")
End If
MessageID = Request("ID")
Set oMessage = Server.CreateObject("MEWebMail.MailMessage")
oMessage.PostOffice = gPostoffice
oMessage.Username = gUserName
oMessage.MarkAsRead = True
oMessage.PostOffice = gPostoffice
oMessage.Username = gUserName
oMessage.Password = gPassword
oMessage.MessageID = MessageID
oMessage.RelativeFolderPath = RelativeFolderPath
oMessage.MarkAsRead = True
oMessage.FlagStatus = 1
oMessage.ComposeMode = True
If oMessage.GetMessage Then
Dim SourceFileName
Dim TargetFileName
SourceFileName = oMessage.GetMailRoot() & "\" & gPostoffice & "\MAILROOT\" & gUserName & RelativeFolderPath & "\" & MessageID
MessageID=oMessage.GetUniqueMessageID
TargetFileName = oMessage.GetMailRoot() & "\" & gPostoffice & "\MAILROOT\" & gUserName & "\Drafts\" & MessageID
oMessage.CopyFile SourceFileName,TargetFileName
Importance = oMessage.Importance
FlagStatus = oMessage.FlagStatus
Attachments = oMessage.Attachment
From = oMessage.FromRecipients
ToRecipients = oMessage.ToRecipients
CCRecipients = oMessage.CCRecipients
Subject = oMessage.Subject
Received = oMessage.MessageDate
Body = oMessage.Body
Recipient = oMessage.Recipient
FrmMsgBody = GetAutoSignitureContent & Chr(13) & Chr(10) & Chr(13) & Chr(10) & "----- Original Message -----" & Chr(13) & Chr(10) & _
"From: " & From & Chr(13) & Chr(10) & _
"To: " & replace(ToRecipients,chr(9),",") & Chr(13) & Chr(10)
if len(CCRecipients)>0 then
FrmMsgBody = FrmMsgBody & "Cc: " & replace(CCRecipients,chr(9),",") & Chr(13) & Chr(10)
end if
FrmMsgBody = FrmMsgBody & "Sent: " & Received & Chr(13) & Chr(10) & _
"Subject: " & Subject & Chr(13) & Chr(10) & Chr(13) & Chr(10) & Body
FrmMsgTo = Server.HTMLEncode(StripAddressList(From))
FrmMsgSubject = "Fwd: " & Subject
FrmMsgTo = ""
WindowTitle = "Forward-" & Subject
set oMessage = nothing
Else
set oMessage = nothing
Response.Write "Message has been deleted and no longer exists.<BR>"
Response.Write "Please click <a href='read.asp?Mode=Close'>here</a> to close this window."
Response.End
End If
Case "Compose"
'
' We need to try to save the message and then load it again.
'
' But we need to know whether we need to save attachments,
MessageID = Request("ID")
If Request("Folder") = "" Then
RelativeFolderPath="\Drafts"
Else
RelativeFolderPath=Request("Folder")
End If
Set oMessage = Server.CreateObject("MEWebMail.MailMessage")
oMessage.MarkAsRead = True
oMessage.PostOffice = gPostoffice
oMessage.Username = gUserName
oMessage.Password = gPassword
oMessage.MessageID = MessageID
oMessage.RelativeFolderPath = RelativeFolderPath
oMessage.MarkAsRead = True
oMessage.FlagStatus = 1
oMessage.ComposeMode = True
If oMessage.GetMessage Then
Importance = oMessage.Importance
FlagStatus = oMessage.FlagStatus
Attachments = oMessage.Attachment
'ToRecipients = oMessage.Recipient
From = oMessage.FromRecipients
FrmMsgSubject = oMessage.Subject
Received = oMessage.Received
FrmMsgBody = oMessage.Body
'Headers = oMessage.Headers
Recipient = oMessage.Recipient
FrmMsgTo = StripAddressList(oMessage.ToRecipients)
FrmMsgCC = StripAddressList(oMessage.CCRecipients)
FrmMsgBCC = StripAddressList(oMessage.BCCRecipients)
WindowTitle = "Compose-" & FrmMsgSubject
set oMessage = nothing
Else
set oMessage = nothing
Response.Write "Message has been deleted and no longer exists.<BR>"
Response.Write "Please click <a href='read.asp?Mode=Close'>here</a> to close this window."
Response.End
End If
Case Else
If Request("Folder") = "" Then
RelativeFolderPath="\Drafts"
Else
RelativeFolderPath=Request("Folder")
End If
'oMessage.RelativeFolderPath = RelativeFolderPath
MessageID = Request("ID")
FrmMsgFrom = Request("MsgFrom")
FrmMsgTo = Request("MsgTo")
FrmMsgCC = Request("MsgCC")
FrmMsgBCC = Request("MsgBCC")
FrmMsgSubject = Request("MsgSubject")
FrmMsgBody = GetAutoSignitureContent & Request("MsgBody")
WindowTitle = "Compose-New Message"
If MessageID = "" Then
Set oMessage = Server.CreateObject("MEWebMail.MailMessage")
MessageID = oMessage.GetUniqueMessageID
Set oMessage = Nothing
End If
End Select
RelativeFolderPath="\Drafts"
%>
<HTML>
<HEAD>
<META name="ROBOTS" content="NOINDEX,NOFOLLOW">
<LINK REL="stylesheet" TYPE="text/css" HREF="<% =session("skin") %>me.css">
<% if len(FrmMailboxCharSet)>0 then %>
<meta http-equiv="Content-Type" content="text/html; charset=<% =FrmMailboxCharSet %>">
<% end if %>
<title><%=WindowTitle%></title>
</HEAD>
<BODY marginheight="0" link="#000000" topmargin="0" leftmargin="0" rightmargin="0" marginwidth="0">
<SCRIPT LANGUAGE="Javascript">
<!--
function SubmitToPage(PageURL)
{
document.FrmMain.action = PageURL;
document.FrmMain.submit();
}
// -->
</SCRIPT>
<FORM NAME=FrmMain METHOD="POST" ACTION="Resolve.asp?ID=<%=MessageID%>&ComposeMode=General&Folder=<%=Server.URLEncode(RelativeFolderPath)%>">
<TABLE WIDTH="100%" CELLPADDING="0" CELLSPACING="0" BORDER="0" class=ME_ButtonBG>
<TR><TD width="90%"> </TD><TD nowrap valign="middle" ><input type=Submit NAME="FormAction" value="Send" class=ME_Button></TD><TD ALIGN="right"><input class=ME_Button type=button value='Cancel' onclick="self.close()"></TD>
</TR>
</TABLE>
<TABLE background="<% =session("skin") %>tab_bg_end.gif" width="100%" CELLPADDING="0" CELLSPACING="0" BORDER="0">
<TR><TD>
<TABLE class=ME_Normal NAME="TabBar" BORDER="0" CELLPADDING=0 CELLSPACING=0>
<TR>
<TD><IMG SRC="<% =session("skin") %>tab_on_start.gif" WIDTH=18 HEIGHT=30></TD>
<TD class=ME_TabOn background="<% =session("skin") %>tab_on_bg.gif" ALIGN="middle"><B>Message</B></TD>
<TD><IMG SRC="<% =session("skin") %>tab_on_to_off.gif" WIDTH=19 HEIGHT=30></TD>
<TD class=ME_TabOff background="<% =session("skin") %>tab_off_bg.gif" ALIGN="middle" STYLE="cursor:hand">
<a href="#" class=ME_Nolink onclick="SubmitToPage('ListAttachments.asp?Mode=Compose&ID=<%=MessageID%>&Folder=<%=Server.URLPathEncode(RelativeFolderPath)%>&ComposeMode=General');return false;">Attachments</a></TD>
<TD><IMG SRC="<% =session("skin") %>tab_off_to_off.gif" WIDTH=19 HEIGHT=30></TD>
<TD class=ME_TabOff background="<% =session("skin") %>tab_off_bg.gif" ALIGN="middle" STYLE="cursor:hand">
<a href="#" class=ME_Nolink onclick="SubmitToPage('MessageOptions.asp?Mode=Compose&ID=<%=MessageID%>&Folder=<%=Server.URLPathEncode(RelativeFolderPath)%>&ComposeMode=General');return false;">Options</a></TD>
<TD WIDTH="10" HEIGHT="30"><IMG SRC="<% =session("skin") %>tab_off_end.gif" WIDTH="10" HEIGHT="30"></td>
<TD noWrap width="*"> </TD>
</TR>
</TABLE>
</TD></TR>
</TABLE>
<TABLE WIDTH="100%" CELLPADDING="0" CELLSPACING="0" BORDER="0" class=ME_MessageHeader>
<TR>
<TD>From:</td><td>
<SELECT NAME="MsgFrom" class=ME_Input style="width:300">
<%
On Error goto 0
Set oAddressMap = Server.CreateObject("MEWebMail.AddressMap")
oAddressMap.Account = Session("POSTOFFICE")
oAddressMap.DestinationAddress = "[SF:" & Session("POSTOFFICE") & "/" & FrmMailbox & "]"
oAddressMap.SourceAddress = ""
oAddressMap.Scope = ""
If oAddressMap.FindFirstAddressMap = 1 Then
do
If InStr(1,oAddressMap.SourceAddress,"[SMTP:") and not instr(1,oAddressMap.SourceAddress,"*") Then
Response.Write "<OPTION NAME=""" & Mid(oAddressMap.SourceAddress,7,Len(oAddressMap.SourceAddress)-7) & """" &">" & Mid(oAddressMap.SourceAddress,7,Len(oAddressMap.SourceAddress)-7) & "</OPTION>"
End If
oAddressMap.Account = Session("POSTOFFICE")
oAddressMap.DestinationAddress = "[SF:" & Session("POSTOFFICE") & "/" & FrmMailbox & "]"
oAddressMap.SourceAddress = ""
oAddressMap.Scope = ""
loop while (oAddressMap.FindNextAddressMap = 1)
Else
Response.Write "<OPTION>No address maps - Contact administrator</OPTION>"
End If
Set oAddressMap = Nothing
%>
</SELECT>
</td></tr>
<tr><td>To:</td><td><input id=MsgTo NAME="MsgTo" class="ME_Input" type=text VALUE="<%=FrmMsgTo%>" type='text' size="38" style="width:300" value=""></td><TD><INPUT TYPE=BUTTON class="ME_Button" onclick="ShowAddressBook('MsgTo')" VALUE="Edit" id=bMsgTo name=bMsgTo></TD></tr>
<tr><td>Cc:</td><td><input id=MsgCc NAME="MsgCc" class="ME_Input" type=text VALUE="<%=FrmMsgCc%>" type='text' size="38" style="width:300" value=""></td><TD><INPUT TYPE=BUTTON class="ME_Button" onclick="ShowAddressBook('MsgCc')" VALUE="Edit" id=bMsgCc name=nMsgCc></TD></tr>
<tr><td>Bcc:</td><td><input id=MsgBcc NAME="MsgBcc" class="ME_Input" type=text VALUE="<%=FrmMsgBcc%>" type='text' size="38" style="width:300" value=""></td><TD><INPUT TYPE=BUTTON class="ME_Button" onclick="ShowAddressBook('MsgBcc')" VALUE="Edit" id=bMsgBcc name=bMsgBcc></TD></tr>
<tr><td>Subject:</td><td COLSPAN=2><input NAME="MsgSubject" type=text class="ME_Input" VALUE="<%=FrmMsgSubject%>" type='text' size="38" style="width:300" value=""></td></tr>
</table>
<TEXTAREA wrap="virtual" name="MsgBody" class=ME_Input style="WIDTH: 100%; HEIGHT: 300px;" cols=60 rows=21><%=FrmMsgBody%></TEXTAREA>
<INPUT NAME=ME_POSTOFFICE TYPE=HIDDEN VALUE="<%=gPostOffice%>">
<INPUT NAME=ME_MAILBOX TYPE=HIDDEN VALUE="<%=gUserName%>">
</FORM>
<script type="text/javascript">
<!--
document.FrmMain.MsgTo.focus();
//-->
</script>
<SCRIPT LANGUAGE="JAVASCRIPT">
function ShowAddressBook(Target)
{
window.open('<%=Application("MEWebPath")%>/base/default/lang/EN/AddressBook.asp?Target='+Target+'&skin=<%=session("skin")%>&AUTH_ACCOUNT=<%=session("AUTH_ACCOUNT")%>&AUTH_USERNAME=<%=session("AUTH_USERNAME")%>','MailEnableAddressBook','center=yes,resizable=1,height=355,width=430');
return false;
}
</SCRIPT>
</BODY>
</HTML>
These obviously ARE NOT supported by mail enable, use them at your own risk, but they should cure the issue.
Andy