MailSend

Hola, es posible enviar un mail en formato HTML con la función @MAILSEND?
Gracias.

2 Respuestas

Respuesta
1
Sí pero con LotusScript.
Si es version 6 lo puedes hacer con las librerias de notes. Si es versión 5 debes crearte esta libreria:
SimpleMIME:
'SimpleMIME: 
Const TYPE_MIME_PART = 25
Const ITEM_SIGN_SEAL = &H0003
Declare Function NSFItemAppend Lib "nnotes" (Byval noteHandle As Long, Byval iFlags As Integer, Byval iName As Lmbcs String,_
Byval iNameLength As Integer, Byval iType As Integer, Byval iValuePointer As Long, Byval iValueLength As Long) As Integer
Declare Function OSMemAlloc Lib "nnotes" (Byval T As Integer, Byval S As Long, hM As Long) As Integer
Declare Function OSMemFree Lib "nnotes" (Byval hM As Long) As Integer
Declare Function OSLockObject Lib "nnotes" (Byval H As Long) As Long
Declare Sub OSUnlockObject Lib "nnotes" (Byval H As Long)
Declare Sub Poke Lib "kernel32" Alias "RtlMoveMemory" (Byval P As Long, D As Any, Byval N As Long)
Declare Sub PokeString Lib "kernel32" Alias "RtlMoveMemory" (Byval P As Long, Byval D As String, Byval N As Long)
Type someType
	Unknown1 As Integer
	Unknown2 As Integer
	Unknown3 As Integer
	Unknown4 As Integer
	length As Integer
	Unknown5 As Integer
	Unknown6 As Integer
	Unknown7 As Integer
	Unknown8 As Integer
	Unknown9 As Integer
End Type
Public Function addMIMEitem( note As notesdocument, Byval itemname As String, Byval itemvalue As String )
	Dim memptr As Long
	Dim memlen As Long
	Dim memhandle As Long
	Dim contenttype As String
	Dim fldheader As sometype
	Dim hlength As Long
	Dim clength As Long
	contenttype = |Content-Type: text/html; charset="us-ascii"| + Chr$(13) + Chr$(10) + Chr$(13) + Chr$(10) + Chr$(13) + Chr$(10)
	itemvalue = contenttype + itemvalue
	hlength = Len(fldheader)
	clength = Len(itemvalue)
	memlen =  hlength + clength
	'set the mystery members
	fldheader.unknown1 = 2
	fldheader.unknown2 = 2
	fldheader.unknown4 = 2
	fldheader.length = Len(itemvalue) 
	fldheader.unknown6 = 47
	'remove existing item
	Call note.removeitem(itemname)
	note.MIME_Version = "1.0"
	rc = OSMemAlloc( 0, memLen, memHandle )
	memPtr = OSLockObject(memHandle)		
	Poke memPtr, fldheader.unknown1, hlength
	PokeString memPtr + hlength, itemvalue, clength
	rc = NSFItemAppend( note.handle, ITEM_SIGN_SEAL , itemname, Len(itemname), TYPE_MIME_PART, memPtr, memLen) 
	OSUnlockObject memHandle
	OSMemFree memHandle
End Function

Y luego crear el mensaje desde un agente, o acción, por ejemplo:
Option Public 
Use "SimpleMIME" 
Sub Initialize 
Dim s As New notessession 
Dim db As notesdatabase 
Dim doc As notesdocument 
Dim html As String 
Set db = s.currentdatabase 
Set doc = db.createdocument 
doc.form = "Memo" 
doc.sendto = "Davy Vanherbergen" 
html = |This <i>is</i> an <b>example</b><p>| 
html = html + |<font color=purple>Hello</font><p>| 
Call addMimeItem( doc, "Body", html ) 
Call doc.send(False)
mmmm, aha. ¿Con lenguaje de fórmulas es imposible? es que es en Web, y para no utilizar LotusScript...
Gracias de todos modos.
No hay ningun problema para usar LotusScript en web.
Pon un botón con LotusScript en el formulario que realice esto.
Respuesta
Creo que no

Añade tu respuesta

Haz clic para o

Más respuestas relacionadas