Creating a user signature with ASP

Discussion for developers using MailEnable.
Post Reply
rolix
Posts: 13
Joined: Tue Jul 12, 2005 9:20 pm
Location: Monterrey, Mexico

Creating a user signature with ASP

Post by rolix »

Hello.

I am using the asp script to create mailboxes dinamically from a table in a database. But I want to create a default user signature with some database fields. I know that there is a function to Set de Signature, but does nos seems to be working cause the file in \Config\Postoffices\mypostoffice\ANNOTATIONS\myuser-AUTOSIG.TXT is not being created for the user (IUSR has write permission on the folder, thats not the problem). The COM object I am using is with the COM object MEAOPO.Mailbox and it creates the mailbox, logins and address maps but no the signature.

I also tried inserting the records MsgFormat set to HTML and AutoSignatureStatus set to 1 in the OPTIONS table (cause my config provider is MSSQL) and writing the TXT file directly to the ANNOTATIONS folder from asp with ADODB.Stream for writing the file in UTF-8 charset but it leaves a strange 3 char string in the begining of the signature when it is loaded in the webmail which I have not being able to remove.

This is the webmail object class definitions I am using: http://mailenable.com/developers/webmailclass.htm
Do they still being valid for Version 6.03 Enterprise?


Any clues for getting this to work?


This is the code I am using:

set oMailbox = server.CreateObject("MEAOPO.Mailbox")
With oMailbox
.Postoffice = request("postoffice")
.Mailbox = request("mailbox")
.Limit = 204800
.RedirectAddress = ""
.RedirectStatus = 0
.Status = 1
lResult = oMailbox.AddMailbox()
End With
if lResult = 0 then
else
oMailbox.SetSignature(request("postoffice"), request("mailbox"), "This is the default signature")
end if



Thank you !

Post Reply