HTML newsletters

This agent will allow you to create an email with HTML formatting as an attachment to your email message.

This agent will allow you to create an email with HTML formatting as an attachment to your email message.

Put this code inside of an agent, and have a directory on a server where a temporary file can be created and written to.


Dim object As notesembeddedobject
Dim htmlmsg As String
Dim tempDir As String
Dim fileNum As Integer

'create html attachment
	htmlmsg = ""
	fileNum% = Freefile()
	tempDir$ = Environ("Temp")
	'Messagebox tempDir$
	Open tempDir$ &"newsletter.htm" For Output As fileNum%
	'Create standard HTML header and titles
	htmlmsg = htmlmsg & |<html>|
	htmlmsg = htmlmsg & |<head>|
	htmlmsg = htmlmsg & |<Title>BlueCuda Newsletter</title>|
	htmlmsg = htmlmsg & |</head>|
	htmlmsg = htmlmsg & |<body>|
	Print #fileNum%, htmlmsg
	htmlmsg =""
'close html standard tags and embed the attachment
	
	htmlmsg = htmlmsg & |</body>|
	htmlmsg = htmlmsg & |</html>|
	Print #fileNum%, htmlmsg
	Close fileNum%
	Set object = rtitem.embedobject(EMBED_ATTACHMENT, "", tempDir$ &"newsletter.htm")
This was first published in August 2001

Dig deeper on Domino Resources

0 comments

Oldest 

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

-ADS BY GOOGLE

SearchWinIT

Search400

  • iSeries tutorials

    Search400.com's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...

SearchEnterpriseLinux

SearchVirtualDataCentre.co.UK

Close